Function at 0x404f70
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4e72f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x10]
call fcn.004be970
xor ebx, ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], ebx
call fcn.004be970
mov al, byte [esp + 0x28]
mov byte [esp + 0x20], 1
cmp al, bl
mov al, byte [esp + 0x2c]
jne 0x405005
xor cx, cx
mov cl, al
cmp cx, word [edi + 0x154]
je 0x405005
movsx dx, byte [0x50c150]
push edx
push 0x50c151
lea ecx, [esp + 0x18]
call fcn.004bef10
mov esi, 3
lea eax, [esp + 0xc]
lea edx, [esp + 0x10]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004be980
call fcn.0047c9f0
add esp, 8
dec esi
jne 0x404fe0
mov al, byte [esp + 0x2c]
cmp byte [0x520198], bl
jne 0x4050ea
cmp byte [esp + 0x28], bl
jne 0x4051ad
cmp al, bl
jne 0x40502f
movsx ax, byte [0x50c170]
push eax
push 0x50c171
jmp 0x405042
movsx cx, byte [0x50c178]
push ecx
mov byte [0x50c17c], al
push 0x50c179
lea ecx, [esp + 0x18]
call fcn.004bef10
lea edx, [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.004be980
call fcn.0047c9f0
add esp, 8
movsx esi, ax
call fcn.004cd4a0
test al, al
je 0x40516f
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push ebx
call fcn.004be9a0
lea ecx, [esp + 0x10]
call fcn.004beca0
push 0x10
push 0x50f964
lea ecx, [esp + 0x14]
call fcn.004bf050
mov esi, 4
call fcn.004df30f
cdq
mov ecx, 0xff
idiv ecx
lea ecx, [esp + 0xc]
push edx
push esi
call fcn.004bedb0
call fcn.004df30f
cdq
mov ecx, 0xff
idiv ecx
lea ecx, [esp + 0xc]
push edx
lea edx, [esi + 1]
push edx
call fcn.004bedb0
add esi, 3
cmp esi, 0x10
jl 0x4050a4
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
lea ecx, [esp + 0x10]
call fcn.004bec90
cmp al, 5
jbe 0x4052d6
lea ecx, [esp + 0xc]
call fcn.004bee30
cmp ax, 6
jle 0x4052d6
mov eax, dword [esp + 0x30]
lea edx, [esp + 0xc]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.004be980
movzx cx, byte [esp + 0x30]
mov eax, dword [esp + 0x34]
push eax
push ecx
mov ecx, edi
call fcn.00404370
lea ecx, [esp + 0xc]
mov esi, eax
mov byte [esp + 0x20], bl
call fcn.004beab0
lea ecx, [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
call fcn.004beab0
mov ax, si
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x18
ret 0xc
cmp esi, ebx
jg 0x4050ea
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], bl
call fcn.004beab0
lea ecx, [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
call fcn.004beab0
or ax, 0xffff
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x18
ret 0xc
cmp al, bl
jne 0x4051c1
movsx ax, byte [0x50c188]
push eax
push 0x50c189
jmp 0x4051d4
movsx cx, byte [0x50c190]
push ecx
mov byte [0x50c194], al
push 0x50c191
lea ecx, [esp + 0x18]
call fcn.004bef10
lea edx, [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.004be980
call fcn.0047c9f0
add esp, 8
movsx esi, ax
call fcn.004cd4a0
test al, al
je 0x40522f
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push ebx
call fcn.004be9a0
lea ecx, [esp + 0x10]
call fcn.004beca0
push 0x10
push 0x50f950
lea ecx, [esp + 0x14]
call fcn.004bf050
jmp 0x405237
cmp esi, ebx
jle 0x405177
call fcn.004cd4a0
test al, al
jne 0x4050ea
push 2
lea ecx, [esp + 0x10]
call fcn.004bec90
cmp al, 2
je 0x4050ea
lea ecx, [esp + 0xc]
lea edx, [esp + 0x10]
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004be980
call fcn.0047c9f0
add esp, 8
cmp ax, bx
jle 0x4052a1
lea eax, [esp + 0xc]
lea edx, [esp + 0x10]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004be980
call fcn.0047c9f0
add esp, 8
cmp ax, bx
jg 0x4050ea
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], bl
call fcn.004beab0
lea ecx, [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
call fcn.004beab0
xor ax, ax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x18
ret 0xc
push ebx
lea ecx, [esp + 0x10]
call fcn.004bec90
cmp al, 4
jne 0x405177
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], bl
call fcn.004beab0
lea ecx, [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
call fcn.004beab0
mov ecx, dword [esp + 0x18]
pop edi
pop esi
mov ax, 0x10
mov dword fs:[0], ecx
pop ebx
add esp, 0x18
ret 0xc