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

Disassembly:
push 0xffffffffffffffff
push 0x419238
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x420988]
xor eax, esp
mov dword [esp + 0x6c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x420988]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov ecx, dword [esp + 0xb0]
mov eax, dword [esp + 0x98]
mov esi, dword [esp + 0xa4]
mov edx, dword [esp + 0xb4]
mov edi, dword [esp + 0xac]
mov ebx, dword [esp + 0xbc]
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0xb8]
push ecx
mov ecx, esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x40], edx
mov dword [esp + 0x1c], eax
call fcn.00401140
push eax
mov dword [esp + 0x90], 0
call fcn.00403ad0
mov ebp, eax
mov eax, dword [esp + 0x44]
add esp, 4
mov dword [esp + 0x34], ebp
mov dword [esp + 0x8c], 0xffffffff
test eax, eax
je 0x4041ea
mov esi, eax
push 0
lea ecx, [esp + 0x28]
mov dword [esp + 0x34], esi
call fcn.00405b3f
mov eax, dword [esi + 4]
test eax, eax
je 0x4041c4
cmp eax, 0xffffffff
jae 0x4041c4
dec eax
mov dword [esi + 4], eax
mov esi, dword [esi + 4]
neg esi
sbb esi, esi
lea ecx, [esp + 0x24]
not esi
call fcn.00405b67
and esi, dword [esp + 0x30]
je 0x4041e6
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x64]
push ecx
mov ecx, ebp
call fcn.00402ff0
mov edx, dword [ebp]
mov eax, dword [edx + 8]
mov ecx, ebp
mov dword [esp + 0x8c], 1
call eax
xor ecx, ecx
mov byte [esp + 0x30], al
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ecx
mov byte [esp + 0x48], cl
mov al, byte [edi]
mov byte [esp + 0x8c], 2
cmp al, 0x2b
je 0x404237
mov dword [esp + 0x24], ecx
cmp al, 0x2d
jne 0x40423f
mov dword [esp + 0x24], 1
call fcn.0040735a
mov ecx, dword [eax]
mov dl, byte [ecx]
push ebx
push 0x65
push edi
mov byte [esp + 0x2c], dl
mov word [esp + 0x2d], 0x65
call fcn.00407380
mov ebp, eax
movsx eax, byte [esp + 0x2c]
push ebx
push eax
push edi
call fcn.00407380
add esp, 0x18
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40427a
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x64]
mov eax, edx
cmp ecx, 0x10
jae 0x40428d
lea eax, [esp + 0x64]
cmp byte [eax], 0x7f
je 0x4043cc
mov eax, edx
cmp ecx, 0x10
jae 0x4042a1
lea eax, [esp + 0x64]
cmp byte [eax], 0
jle 0x4043cc
push ebx
push edi
lea ecx, [esp + 0x50]
call fcn.00403550
test ebp, ebp
jne 0x4042cf
mov ecx, dword [esp + 0x18]
push 0x30
push ecx
lea ecx, [esp + 0x50]
call fcn.00403670
mov esi, dword [esp + 0x14]
jmp 0x4042fe
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x4042eb
mov edx, dword [esp + 0x1c]
push 0x30
push edx
lea ecx, [esp + 0x50]
call fcn.00403670
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x18]
push 0x30
push eax
sub ebp, edi
push ebp
lea ecx, [esp + 0x54]
call fcn.00403460
push 0x30
test esi, esi
jne 0x404314
mov ecx, dword [esp + 0x20]
push ecx
lea ecx, [esp + 0x50]
call fcn.00403670
jmp 0x404341
mov edx, dword [esp + 0x40]
sub esi, edi
push edx
lea eax, [esi + 1]
push eax
lea ecx, [esp + 0x54]
call fcn.00403460
mov ecx, dword [esp + 0x1c]
push 0x30
push ecx
push esi
lea ecx, [esp + 0x54]
call fcn.00403460
mov dword [esp + 0x3c], 0
mov edi, dword [esp + 0x64]
mov ebx, 0x10
mov dword [esp + 0x1c], 0
cmp dword [esp + 0x78], ebx
jae 0x40435c
lea edi, [esp + 0x64]
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x5c], ebx
jae 0x40436a
lea eax, [esp + 0x48]
lea edx, [esp + 0x20]
push edx
push eax
call fcn.00407430
mov esi, eax
mov al, byte [edi]
add esp, 8
cmp al, 0x7f
je 0x4043ae
test al, al
jle 0x4043ae
mov ecx, esi
sub ecx, dword [esp + 0x24]
movsx eax, al
cmp eax, ecx
jae 0x4043ae
push 0
sub esi, eax
push 1
push esi
lea ecx, [esp + 0x54]
call fcn.00403460
cmp byte [edi + 1], 0
jle 0x4043a8
inc edi
mov al, byte [edi]
cmp al, 0x7f
jne 0x404380
mov edi, dword [esp + 0x48]
cmp dword [esp + 0x5c], ebx
jae 0x4043bc
lea edi, [esp + 0x48]
mov ebx, dword [esp + 0x58]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x18], 0
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x20]
lea eax, [ebx + edx]
add eax, dword [esp + 0x3c]
add eax, dword [esp + 0x1c]
cmp dword [esi + 0x24], 0
jl 0x4043f6
jg 0x4043ea
test ecx, ecx
je 0x4043f6
cmp ecx, eax
jbe 0x4043f6
sub ecx, eax
mov dword [esp + 0x14], ecx
jmp 0x4043fe
mov dword [esp + 0x14], 0
mov eax, dword [esi + 0x14]
mov esi, dword [esp + 0x94]
and eax, 0x1c0
cmp eax, 0x40
je 0x4044a0
cmp eax, 0x100
jne 0x40445a
cmp dword [esp + 0x24], 0
jbe 0x40445a
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x9c]
push 1
push edi
push ecx
push edx
lea eax, [esp + 0x34]
push eax
push esi
call fcn.00402980
mov ecx, dword [eax]
mov dword [esp + 0xb4], ecx
mov edx, dword [eax + 4]
add esp, 0x18
inc edi
mov dword [esp + 0xa0], edx
dec ebx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xa0]
push eax
mov eax, dword [esp + 0xa0]
push ecx
push edx
push eax
lea ecx, [esp + 0x34]
push ecx
push esi
call fcn.00402910
mov edx, dword [eax]
mov dword [esp + 0xb4], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x2c], 0
mov dword [esp + 0xb8], eax
add esp, 0x18
movsx ecx, byte [esp + 0x20]
push ebx
push ecx
push edi
call fcn.00407380
add esp, 0xc
test eax, eax
je 0x40459b
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0xa0]
sub eax, edi
push edx
mov edx, dword [esp + 0xa0]
lea ebp, [eax + 1]
lea eax, [ebp - 1]
push eax
push edi
push ecx
push edx
lea eax, [esp + 0x38]
push eax
push esi
call fcn.004029f0
mov ecx, dword [eax]
mov dword [esp + 0xb8], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x38]
push ecx
mov dword [esp + 0xc0], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 0x30
push edx
push eax
lea ecx, [esp + 0x50]
push ecx
push esi
call fcn.00402910
mov edx, dword [eax]
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xd0], edx
mov eax, dword [eax + 4]
mov dword [esp + 0xd4], eax
mov edx, dword [ecx]
mov eax, dword [edx + 4]
add esp, 0x34
call eax
mov edx, dword [esp + 0xa0]
push 1
mov byte [esp + 0x38], al
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0xa0]
push ecx
push edx
push eax
lea ecx, [esp + 0x34]
push ecx
push esi
call fcn.00402910
mov edx, dword [eax]
mov dword [esp + 0xb4], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x54]
push edx
mov dword [esp + 0xbc], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x5c]
push eax
push esi
call fcn.00402910
mov ecx, dword [eax]
mov dword [esp + 0xcc], ecx
mov edx, dword [eax + 4]
add esp, 0x30
add edi, ebp
mov dword [esp + 0xa0], edx
sub ebx, ebp
push ebx
push 0x65
push edi
call fcn.00407380
add esp, 0xc
test eax, eax
je 0x404666
mov edx, dword [esp + 0xa0]
sub eax, edi
lea ebp, [eax + 1]
mov eax, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0xa0]
lea ecx, [ebp - 1]
push ecx
push edi
push edx
push eax
lea ecx, [esp + 0x48]
push ecx
push esi
call fcn.004029f0
mov edx, dword [eax]
mov dword [esp + 0xb8], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x34]
push edx
mov dword [esp + 0xc0], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x60]
push eax
push esi
call fcn.00402910
mov ecx, dword [eax]
mov dword [esp + 0xd0], ecx
mov ecx, dword [esp + 0x60]
mov edx, dword [eax + 4]
add esp, 0x34
test byte [ecx + 0x14], 4
mov dword [esp + 0xa0], edx
mov dword [esp + 0x18], 0
mov ecx, 0x41a4e0
jne 0x404637
mov ecx, 0x41a4dc
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 1
push ecx
push edx
push eax
lea ecx, [esp + 0x44]
push ecx
push esi
call fcn.00402980
mov edx, dword [eax]
mov dword [esp + 0xb4], edx
mov eax, dword [eax + 4]
add esp, 0x18
add edi, ebp
mov dword [esp + 0xa0], eax
sub ebx, ebp
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x9c]
push ecx
push ebx
push edi
push edx
push eax
lea ecx, [esp + 0x48]
push ecx
push esi
call fcn.004029f0
mov edx, dword [eax]
mov dword [esp + 0xb8], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x34]
push edx
mov dword [esp + 0xc0], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x60]
push eax
push esi
call fcn.00402910
mov ecx, dword [eax]
mov edx, dword [esp + 0x60]
mov edi, dword [esp + 0x78]
mov dword [esp + 0xd0], ecx
mov eax, dword [eax + 4]
xor ebx, ebx
mov dword [edx + 0x20], ebx
mov dword [edx + 0x24], ebx
mov edx, dword [esp + 0x48]
push edx
mov edx, dword [esp + 0xe0]
push edx
push eax
push ecx
push edi
push esi
mov dword [esp + 0xec], eax
call fcn.00402910
mov esi, 0x10
add esp, 0x4c
cmp dword [esp + 0x5c], esi
jb 0x404708
mov eax, dword [esp + 0x48]
push eax
call fcn.0040666b
add esp, 4
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
cmp dword [esp + 0x78], esi
jb 0x40472b
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0040666b
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00406e86
add esp, 0x7c
ret