Function at 0x409f50
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4e8750
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x52a6ec]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x52a6ec]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
mov eax, dword [esp + 0x78]
mov ebp, dword [esp + 0x7c]
mov ebx, edx
lea edi, [esp + 0x3c]
mov dword [esp + 0x30], eax
mov byte [esp + 0x1b], cl
mov dword [esp + 0x2c], ebx
call fcn.00406ec0
mov edi, eax
mov dword [esp + 0x6c], 0
call fcn.0040ac00
mov dword [esp + 0x34], eax
mov dword [esp + 0x6c], 0xffffffff
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x40a001
push 0
lea ecx, [esp + 0x20]
mov edi, eax
call fcn.004c89d3
mov eax, dword [edi + 4]
test eax, eax
je 0x409fe1
cmp eax, 0xffffffff
jae 0x409fe1
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [esp + 0x1c]
not esi
call fcn.004c89fb
and esi, edi
je 0x40a001
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov ecx, dword [esp + 0x34]
lea esi, [esp + 0x40]
call fcn.0040a6b0
mov ecx, 1
mov dword [esp + 0x6c], ecx
mov al, byte [ebx]
cmp al, 0x2b
je 0x40a044
cmp al, 0x2d
je 0x40a044
cmp al, 0x30
jne 0x40a03a
mov al, byte [ebx + 1]
cmp al, 0x78
je 0x40a030
cmp al, 0x58
jne 0x40a03a
mov dword [esp + 0x1c], 2
jmp 0x40a048
mov dword [esp + 0x1c], 0
jmp 0x40a048
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x40]
mov eax, edx
cmp ecx, 0x10
jae 0x40a05b
lea eax, [esp + 0x40]
cmp byte [eax], 0xff
je 0x40a0d3
mov eax, edx
cmp ecx, 0x10
jae 0x40a06b
lea eax, [esp + 0x40]
cmp byte [eax], 0
jbe 0x40a0d3
cmp ecx, 0x10
jb 0x40a07b
mov dword [esp + 0x24], edx
jmp 0x40a083
lea ecx, [esp + 0x40]
mov dword [esp + 0x24], ecx
mov edx, dword [esp + 0x24]
mov al, byte [edx]
mov esi, ebp
cmp al, 0xff
je 0x40a0d3
test al, al
je 0x40a0d3
mov ecx, esi
sub ecx, dword [esp + 0x1c]
movzx eax, al
cmp eax, ecx
jae 0x40a0d3
sub esi, eax
mov eax, ebp
sub eax, esi
inc eax
push eax
lea edi, [ebx + esi]
push edi
push eax
lea eax, [ebx + esi + 1]
push eax
call fcn.004c9ab8
mov eax, dword [esp + 0x34]
add esp, 0x10
mov byte [edi], 0
inc ebp
cmp byte [eax + 1], 0
jbe 0x40a0cd
inc eax
mov dword [esp + 0x24], eax
mov al, byte [eax]
cmp al, 0xff
jne 0x40a08f
mov edi, dword [esp + 0x30]
mov eax, dword [edi + 0x24]
mov esi, dword [edi + 0x20]
mov ecx, esi
test eax, eax
jl 0x40a0f9
jg 0x40a0e9
test ecx, ecx
je 0x40a0f9
mov dword [esp + 0x28], eax
cmp esi, ebp
jbe 0x40a0f9
mov dword [esp + 0x28], eax
sub esi, ebp
jmp 0x40a0fb
xor esi, esi
mov eax, dword [edi + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x40a19f
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x80]
cmp eax, 0x100
je 0x40a137
mov bl, byte [esp + 0x1b]
push ecx
push edx
mov eax, esi
lea edi, [esp + 0x24]
call fcn.0040a240
add esp, 8
jmp 0x40a182
mov eax, dword [esp + 0x1c]
push eax
push ecx
push edx
lea eax, [esp + 0x30]
push eax
mov eax, ebx
call fcn.0040a590
mov ecx, dword [eax]
mov dword [esp + 0x90], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x2c]
add ebx, ecx
mov dword [esp + 0x94], edx
mov edx, dword [eax]
sub ebp, ecx
mov ecx, dword [eax + 4]
push ecx
mov dword [esp + 0x40], ebx
mov bl, byte [esp + 0x2f]
push edx
mov eax, esi
lea edi, [esp + 0x34]
call fcn.0040a240
add esp, 0x18
mov ecx, dword [eax]
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x80], ecx
mov edx, dword [eax + 4]
xor esi, esi
mov dword [esp + 0x84], edx
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x80]
push ecx
push edx
push ebp
lea ecx, [esp + 0x40]
push ebx
push ecx
call fcn.0040a600
mov ecx, dword [eax]
mov bl, byte [esp + 0x2f]
mov dword [esp + 0x94], ecx
mov eax, dword [eax + 4]
add esp, 0x14
xor edx, edx
push eax
mov dword [esp + 0x88], eax
mov dword [edi + 0x20], edx
mov dword [edi + 0x24], edx
mov edi, dword [esp + 0x78]
push ecx
mov eax, esi
call fcn.0040a240
add esp, 8
mov dword [esp + 0x6c], 0xffffffff
cmp dword [esp + 0x54], 0x10
jb 0x40a214
mov edx, dword [esp + 0x40]
push edx
call fcn.004c9387
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004c9392
add esp, 0x5c
ret