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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 0xc]
sub esp, 0x3c
push ebx
push esi
xor esi, esi
push edi
cmp eax, 0xf8
jb 0x402cca
mov ecx, dword [ebp + 8]
add eax, ecx
mov ebx, dword [ecx]
add ebx, ecx
cmp ebx, eax
jae 0x402cca
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x402cca
test byte [ebx + 0x38], 1
jne 0x402cca
movzx eax, word [ebx + 0x14]
movzx edx, word [ebx + 6]
add eax, 0x24
test edx, edx
je 0x402b33
add eax, ebx
mov ecx, dword [eax + 4]
mov edi, dword [eax]
test ecx, ecx
jne 0x402b23
mov ecx, dword [ebx + 0x38]
add ecx, edi
cmp ecx, esi
jbe 0x402b2b
mov esi, ecx
add eax, 0x28
sub edx, 1
jne 0x402b17
mov ecx, dword [ebx + 0x50]
lea eax, [esi + 0xfff]
add ecx, 0xfff
and eax, 0xfffff000
and ecx, 0xfffff000
cmp ecx, eax
jne 0x402cca
push 0
push ecx
push 0
push 0
mov ecx, 0x3000
call fcn.00402030
add esp, 0x10
mov dword [esp + 0x14], eax
test eax, eax
je 0x402cca
mov eax, dword [0x8f254c]
test eax, eax
jne 0x402c10
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov word [esp + 0x44], ax
mov byte [esp + 0x46], al
lea eax, [esp + 0x38]
push eax
push 0x13
push 0x4ad26c
call fcn.004038f0
add esp, 0xc
call fcn.00402fc0
mov esi, eax
call fcn.00401190
test esi, esi
je 0x402be9
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x402be9
mov ecx, dword [eax + esi + 0x7c]
test ecx, ecx
je 0x402be9
mov eax, dword [eax + esi + 0x78]
test eax, eax
je 0x402be9
lea edx, [esp + 0x38]
push edx
push ecx
lea edx, [eax + esi]
mov ecx, esi
call fcn.00403460
add esp, 8
test eax, eax
jne 0x402c03
mov eax, dword [0x8f23f8]
test eax, eax
jne 0x402bfb
mov dword [0x8f254c], eax
xor edi, edi
jmp 0x402c14
lea ecx, [esp + 0x38]
push ecx
push esi
call eax
mov dword [0x8f254c], eax
test eax, eax
jne 0x402c10
xor edi, edi
jmp 0x402c14
call eax
mov edi, eax
mov eax, dword [0x8f2548]
test eax, eax
jne 0x402ca1
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov word [esp + 0x34], ax
lea eax, [esp + 0x2c]
push eax
push 0xe
push 0x4ad23c
call fcn.004038f0
add esp, 0xc
call fcn.00402fc0
mov esi, eax
call fcn.00401190
test esi, esi
je 0x402c80
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x402c80
mov ecx, dword [eax + esi + 0x7c]
test ecx, ecx
je 0x402c80
mov eax, dword [eax + esi + 0x78]
test eax, eax
je 0x402c80
lea edx, [esp + 0x2c]
push edx
push ecx
lea edx, [eax + esi]
mov ecx, esi
call fcn.00403460
add esp, 8
test eax, eax
jne 0x402c98
mov eax, dword [0x8f23f8]
test eax, eax
jne 0x402c90
mov dword [0x8f2548], eax
jmp 0x402cb2
lea ecx, [esp + 0x2c]
push ecx
push esi
call eax
mov dword [0x8f2548], eax
test eax, eax
je 0x402cb2
push 0x18
push 8
push edi
call eax
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
jne 0x402cd3
mov eax, dword [esp + 0x14]
mov ecx, 0x8000
push 0
cdq
push 0
push edx
push eax
call fcn.004017d0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 0xc]
mov dword [esi + 8], ecx
mov dword [esi + 0x14], 0x1000
cmp eax, dword [ebx + 0x54]
jb 0x402cca
mov dword [esi], ebx
mov eax, ecx
sub eax, dword [ebx + 0x34]
xor edx, edx
mov dword [ebx + 0x34], ecx
mov ecx, dword [esi]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x18], eax
movzx edi, word [ecx + 0x14]
add edi, 0x24
mov dword [esp + 0x1c], 0
cmp dx, word [ecx + 6]
jae 0x402df3
cdq
add edi, ecx
mov esi, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], esi
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x402d7d
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x402dcd
mov ecx, dword [edi]
mov eax, esi
cdq
push edx
push eax
xor eax, eax
add ecx, dword [esp + 0x28]
adc eax, dword [esp + 0x18]
push eax
push ecx
mov ecx, 0x1000
call fcn.00402030
add esp, 0x10
test eax, eax
je 0x402cca
mov eax, dword [edi]
add eax, dword [esp + 0x18]
mov dword [edi - 4], eax
test esi, esi
je 0x402dc9
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub esi, 1
jne 0x402d70
jmp 0x402dc9
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x402cca
push 0
push ecx
mov ecx, dword [edi]
xor eax, eax
add ecx, esi
adc eax, edx
push eax
push ecx
mov ecx, 0x1000
call fcn.00402030
add esp, 0x10
test eax, eax
je 0x402cca
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp + 8]
add esi, dword [esp + 0x1c]
push eax
push esi
call fcn.00401900
add esp, 0xc
mov dword [edi - 4], esi
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
add edi, 0x28
mov esi, dword [esp + 0x1c]
inc esi
mov dword [esp + 0x1c], esi
mov ecx, dword [eax]
movzx eax, word [ecx + 6]
cmp esi, eax
mov esi, dword [esp + 0x20]
jl 0x402d28
mov esi, dword [esp + 0xc]
cmp dword [esp + 0x24], 0
je 0x402f22
cmp dword [ecx + 0xa4], 0
jne 0x402e0e
xor eax, eax
jmp 0x402f27
mov edx, dword [esi + 8]
mov ecx, dword [ecx + 0xa0]
add ecx, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], ecx
mov eax, dword [ecx]
test eax, eax
je 0x402f22
jmp 0x402e30
lea ebx, [eax + edx]
xor esi, esi
mov eax, dword [ecx + 4]
lea edi, [ecx + 4]
sub eax, 8
lea edx, [ecx + 8]
test eax, 0xfffffffe
jbe 0x402e82
jmp 0x402e50
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x402e6f
mov ecx, dword [esp + 0x24]
and eax, 0xfff
add dword [eax + ebx], ecx
mov eax, dword [edi]
inc esi
sub eax, 8
add edx, 2
shr eax, 1
cmp esi, eax
jb 0x402e50
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x14]
mov dword [esp + 0x20], eax
mov eax, ebx
cdq
mov dword [esp + 0x18], eax
mov eax, dword [0x8f241c]
mov dword [esp + 0x1c], edx
test eax, eax
je 0x402f0e
mov ecx, dword [eax]
xor esi, esi
test ecx, ecx
je 0x402f06
add eax, 4
lea esp, [esp]
cmp dword [eax], 0x10c425cc
je 0x402ec2
inc esi
add eax, 4
cmp esi, ecx
jb 0x402eb0
jmp 0x402f06
cmp esi, 0xffffffff
je 0x402f06
call fcn.00403330
cmp dword [0x8f253c], 0
je 0x402ef4
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 3
push esi
call fcn.004031b0
add esp, 0x20
jmp 0x402f06
push dword [esp + 0x20]
push ebx
push 0xffffffffffffffff
push 3
push esi
call fcn.0041c820
add esp, 0x14
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
add ecx, dword [edi]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], ecx
mov eax, dword [ecx]
test eax, eax
jne 0x402e30
mov eax, 1
mov ecx, esi
mov dword [esi + 0x10], eax
call fcn.00401690
test eax, eax
je 0x402cca
mov ecx, esi
call fcn.00401c10
test eax, eax
je 0x402cca
mov ecx, dword [esi]
mov edx, ecx
mov ebx, dword [esp + 0xc]
mov esi, dword [ecx + 0xc0]
test esi, esi
je 0x402f8b
cmp dword [ecx + 0xc4], 0
je 0x402f8b
mov edi, dword [ebx + 8]
mov esi, dword [edi + esi + 0xc]
test esi, esi
je 0x402f8b
mov eax, dword [esi]
test eax, eax
je 0x402f8b
push 0
push 1
push edi
push eax
call fcn.0041c850
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x402f74
mov edx, dword [ebx]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x402fae
mov ecx, dword [esp + 0x14]
add eax, ecx
push 0
push 1
push ecx
call eax
test eax, eax
je 0x402cca
mov dword [ebx + 0xc], 1
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret