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

Disassembly:
sub esp, 0x70
mov eax, dword [0x4163c0]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x78]
push ebx
push ebp
mov ebp, dword [esp + 0x7c]
push esi
mov dword [esp + 0x20], eax
xor eax, eax
push edi
mov ebx, ecx
lea esi, [esp + 0x54]
mov edi, ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], eax
call fcn.00407c50
test eax, eax
jne 0x40878e
mov eax, dword [esp + 0x58]
test eax, eax
ja 0x408251
mov esi, dword [esp + 0x54]
cmp esi, 0x80000000
jae 0x408251
test eax, eax
ja 0x408251
cmp esi, 0x4000000
jb 0x408269
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00403cc5
add esp, 0x70
ret
cmp esi, 0x20
ja 0x408251
mov dword [ebx + 0x10], esi
test esi, esi
jne 0x4083f8
mov dword [ebx], esi
test esi, esi
jbe 0x40829c
xor edi, edi
mov dword [esp + 0x1c], esi
mov eax, dword [ebx]
add eax, edi
push eax
call fcn.0040a600
add esp, 4
add edi, 0x18
sub dword [esp + 0x1c], 1
jne 0x408285
xor eax, eax
mov dword [esp + 0x18], eax
cmp esi, eax
jbe 0x408251
mov dword [esp + 0x1c], eax
lea ebx, [ebx]
mov ecx, dword [esp + 0x20]
mov ebx, dword [ecx]
add ebx, dword [esp + 0x1c]
mov esi, dword [ebp + 4]
mov dword [esp + 0x30], ebx
test esi, esi
je 0x40860b
mov eax, dword [ebp]
dec esi
mov dword [ebp + 4], esi
mov dl, byte [eax]
lea ecx, [eax + 1]
movzx eax, dl
and eax, 0xf
mov byte [esp + 0x13], dl
mov dword [ebp], ecx
mov edi, 0
jbe 0x40830b
lea esp, [esp]
test esi, esi
je 0x40860b
dec esi
mov dword [ebp + 4], esi
mov dl, byte [ecx]
mov byte [esp + edi + 0x6c], dl
inc ecx
inc edi
mov dword [ebp], ecx
cmp edi, eax
jb 0x4082f0
cmp eax, 8
ja 0x408251
xor ecx, ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], ecx
cmp eax, ecx
jbe 0x40834c
xor edi, edi
lea esi, [esp + eax + 0x6b]
mov dword [esp + 0x40], eax
lea ebx, [ebx]
movzx eax, byte [esi]
cdq
mov ecx, edi
call fcn.0040e6b0
or dword [ebx + 8], eax
or dword [ebx + 0xc], edx
dec esi
add edi, 8
sub dword [esp + 0x40], 1
jne 0x408330
test byte [esp + 0x13], 0x10
je 0x408430
lea esi, [esp + 0x5c]
mov edi, ebp
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x60]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x5c]
jb 0x408387
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x40839c
cmp eax, 0x4000000
jae 0x408251
lea esi, [esp + 0x64]
mov dword [ebx], eax
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x68]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x64]
jb 0x4083cc
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x4083e1
cmp eax, 0x4000000
jae 0x408251
cmp dword [ebx], 0x20
mov dword [ebx + 4], eax
ja 0x408251
cmp eax, 0x20
ja 0x408251
jmp 0x40843d
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
lea ecx, [esi + esi*2]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
push eax
call edx
add esp, 8
mov dword [ebx], eax
test eax, eax
jne 0x40827b
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00403cc5
add esp, 0x70
ret
mov dword [ebx], 1
mov dword [ebx + 4], 1
test byte [esp + 0x13], 0x20
je 0x40848c
xor eax, eax
lea esi, [esp + 0x4c]
mov edi, ebp
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
call fcn.00407c50
test eax, eax
jne 0x40878e
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x4c]
push eax
lea edi, [ebx + 0x10]
push esi
push edi
call fcn.0040a910
add esp, 0xc
test eax, eax
je 0x408418
mov edi, dword [edi]
mov eax, ebp
call fcn.00407be0
test eax, eax
jne 0x40878e
test byte [esp + 0x13], 0x80
je 0x4085c1
jmp 0x4084a0
mov eax, dword [ebp + 4]
test eax, eax
je 0x40860b
lea ecx, [eax - 1]
mov eax, dword [ebp]
mov dword [ebp + 4], ecx
mov bl, byte [eax]
mov dl, bl
and dl, 0xf
lea esi, [eax + 1]
movzx eax, dl
cdq
xor edi, edi
mov dword [ebp], esi
cmp edx, edi
ja 0x40860b
jb 0x4084d9
cmp eax, ecx
ja 0x40860b
sub ecx, eax
add esi, eax
mov dword [ebp + 4], ecx
mov dword [ebp], esi
test bl, 0x10
je 0x408574
lea esi, [esp + 0x38]
mov edi, ebp
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x3c]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x38]
jb 0x40851c
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x408531
cmp eax, 0x4000000
jae 0x408251
lea esi, [esp + 0x28]
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x2c]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x28]
jb 0x40855f
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x408574
cmp eax, 0x4000000
jae 0x408251
test bl, 0x20
je 0x4085b5
xor eax, eax
lea esi, [esp + 0x44]
mov edi, ebp
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
call fcn.00407c50
test eax, eax
jne 0x40878e
mov edx, dword [esp + 0x48]
mov eax, dword [ebp + 4]
xor ecx, ecx
cmp edx, ecx
ja 0x40860b
mov ecx, dword [esp + 0x44]
jb 0x4085ad
cmp ecx, eax
ja 0x40860b
sub eax, ecx
add dword [ebp], ecx
mov dword [ebp + 4], eax
test bl, bl
js 0x4084a0
mov ebx, dword [esp + 0x30]
mov eax, dword [ebx]
add dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add eax, dword [ebx + 4]
add dword [esp + 0x1c], 0x18
inc ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x54]
jb 0x4082b0
xor ebx, ebx
cmp eax, ebx
je 0x408251
mov edi, dword [esp + 0x20]
lea esi, [eax - 1]
mov dword [esp + 0x14], esi
mov dword [edi + 0x14], esi
cmp esi, ebx
jne 0x408623
mov dword [edi + 4], ebx
jmp 0x408642
pop edi
pop esi
pop ebp
mov eax, 0x10
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00403cc5
add esp, 0x70
ret
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
lea ecx, [esi*8]
push ecx
push eax
call edx
add esp, 8
mov dword [edi + 4], eax
cmp eax, ebx
je 0x408418
mov dword [esp + 0x18], ebx
cmp esi, ebx
jbe 0x4086fe
mov edi, edi
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x18]
lea esi, [esp + 0x28]
mov edi, ebp
lea ebx, [ecx + edx*8]
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x2c]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x28]
jb 0x40868e
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x4086a3
cmp eax, 0x4000000
jae 0x408251
lea esi, [esp + 0x38]
mov dword [ebx], eax
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x3c]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x38]
jb 0x4086d3
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x4086e8
cmp eax, 0x4000000
jae 0x408251
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x14]
jb 0x408650
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
cmp edi, eax
jb 0x408251
mov ebx, dword [esp + 0x20]
mov esi, edi
sub esi, eax
mov dword [esp + 0x14], esi
mov dword [ebx + 0x18], esi
jne 0x4087a1
mov dword [ebx + 8], 0
xor ebx, ebx
test esi, esi
jbe 0x40878c
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 8]
lea edx, [ecx + ebx*4]
lea esi, [esp + 0x28]
mov edi, ebp
mov dword [esp + 0x30], edx
call fcn.00407c50
test eax, eax
jne 0x40878e
mov ecx, dword [esp + 0x2c]
test ecx, ecx
ja 0x408251
mov eax, dword [esp + 0x28]
jb 0x40876a
cmp eax, 0x80000000
jae 0x408251
test ecx, ecx
ja 0x408251
jb 0x40877f
cmp eax, 0x4000000
jae 0x408251
mov ecx, dword [esp + 0x30]
inc ebx
mov dword [ecx], eax
cmp ebx, dword [esp + 0x14]
jb 0x408730
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00403cc5
add esp, 0x70
ret
lea eax, [esi*4]
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
push eax
call ecx
add esp, 8
mov dword [ebx + 8], eax
test eax, eax
je 0x408418
cmp esi, 1
jne 0x40872a
xor esi, esi
test edi, edi
jbe 0x4087e3
nop
push esi
push ebx
call fcn.0040a740
add esp, 8
test eax, eax
jl 0x4087e3
inc esi
cmp esi, edi
jb 0x4087d0
cmp esi, edi
je 0x408251
mov edx, dword [ebx + 8]
mov ecx, dword [esp + 0x7c]
pop edi
mov dword [edx], esi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00403cc5
add esp, 0x70
ret