Function at 0x402c00
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 0x402e0a
mov ecx, dword [ebp + 8]
add eax, ecx
mov ebx, dword [ecx]
add ebx, ecx
cmp ebx, eax
jae 0x402e0a
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x402e0a
test byte [ebx + 0x38], 1
jne 0x402e0a
movzx eax, word [ebx + 0x14]
movzx edx, word [ebx + 6]
add eax, 0x24
test edx, edx
je 0x402c73
add eax, ebx
mov ecx, dword [eax + 4]
mov edi, dword [eax]
test ecx, ecx
jne 0x402c63
mov ecx, dword [ebx + 0x38]
add ecx, edi
cmp ecx, esi
jbe 0x402c6b
mov esi, ecx
add eax, 0x28
sub edx, 1
jne 0x402c57
mov ecx, dword [ebx + 0x50]
lea eax, [esi + 0xfff]
add ecx, 0xfff
and eax, 0xfffff000
and ecx, 0xfffff000
cmp ecx, eax
jne 0x402e0a
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 0x402e0a
mov eax, dword [0x817e98]
test eax, eax
jne 0x402d50
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 0x4c8f1c
call fcn.00403a30
add esp, 0xc
call fcn.00403100
mov esi, eax
call fcn.00401190
test esi, esi
je 0x402d29
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x402d29
mov ecx, dword [eax + esi + 0x7c]
test ecx, ecx
je 0x402d29
mov eax, dword [eax + esi + 0x78]
test eax, eax
je 0x402d29
lea edx, [esp + 0x38]
push edx
push ecx
lea edx, [eax + esi]
mov ecx, esi
call fcn.004035a0
add esp, 8
test eax, eax
jne 0x402d43
mov eax, dword [0x817b40]
test eax, eax
jne 0x402d3b
mov dword [0x817e98], eax
xor edi, edi
jmp 0x402d54
lea ecx, [esp + 0x38]
push ecx
push esi
call eax
mov dword [0x817e98], eax
test eax, eax
jne 0x402d50
xor edi, edi
jmp 0x402d54
call eax
mov edi, eax
mov eax, dword [0x817e94]
test eax, eax
jne 0x402de1
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov word [esp + 0x34], ax
lea eax, [esp + 0x2c]
push eax
push 0xe
push 0x4c8eec
call fcn.00403a30
add esp, 0xc
call fcn.00403100
mov esi, eax
call fcn.00401190
test esi, esi
je 0x402dc0
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x402dc0
mov ecx, dword [eax + esi + 0x7c]
test ecx, ecx
je 0x402dc0
mov eax, dword [eax + esi + 0x78]
test eax, eax
je 0x402dc0
lea edx, [esp + 0x2c]
push edx
push ecx
lea edx, [eax + esi]
mov ecx, esi
call fcn.004035a0
add esp, 8
test eax, eax
jne 0x402dd8
mov eax, dword [0x817b40]
test eax, eax
jne 0x402dd0
mov dword [0x817e94], eax
jmp 0x402df2
lea ecx, [esp + 0x2c]
push ecx
push esi
call eax
mov dword [0x817e94], eax
test eax, eax
je 0x402df2
push 0x18
push 8
push edi
call eax
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
jne 0x402e13
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 0x402e0a
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 0x402f33
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 0x402ebd
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x402f0d
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 0x402e0a
mov eax, dword [edi]
add eax, dword [esp + 0x18]
mov dword [edi - 4], eax
test esi, esi
je 0x402f09
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub esi, 1
jne 0x402eb0
jmp 0x402f09
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x402e0a
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 0x402e0a
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 0x402e68
mov esi, dword [esp + 0xc]
cmp dword [esp + 0x24], 0
je 0x403062
cmp dword [ecx + 0xa4], 0
jne 0x402f4e
xor eax, eax
jmp 0x403067
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 0x403062
jmp 0x402f70
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 0x402fc2
jmp 0x402f90
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x402faf
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 0x402f90
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 [0x817b64]
mov dword [esp + 0x1c], edx
test eax, eax
je 0x40304e
mov ecx, dword [eax]
xor esi, esi
test ecx, ecx
je 0x403046
add eax, 4
lea esp, [esp]
cmp dword [eax], 0xec18a192
je 0x403002
inc esi
add eax, 4
cmp esi, ecx
jb 0x402ff0
jmp 0x403046
cmp esi, 0xffffffff
je 0x403046
call fcn.00403470
cmp dword [0x817c84], 0
je 0x403034
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 3
push esi
call fcn.004032f0
add esp, 0x20
jmp 0x403046
push dword [esp + 0x20]
push ebx
push 0xffffffffffffffff
push 3
push esi
call fcn.0041bb50
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 0x402f70
mov eax, 1
mov ecx, esi
mov dword [esi + 0x10], eax
call fcn.00401690
test eax, eax
je 0x402e0a
mov ecx, esi
call fcn.00401c10
test eax, eax
je 0x402e0a
mov ecx, dword [esi]
mov edx, ecx
mov ebx, dword [esp + 0xc]
mov esi, dword [ecx + 0xc0]
test esi, esi
je 0x4030cb
cmp dword [ecx + 0xc4], 0
je 0x4030cb
mov edi, dword [ebx + 8]
mov esi, dword [edi + esi + 0xc]
test esi, esi
je 0x4030cb
mov eax, dword [esi]
test eax, eax
je 0x4030cb
push 0
push 1
push edi
push eax
call fcn.0041bb80
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x4030b4
mov edx, dword [ebx]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x4030ee
mov ecx, dword [esp + 0x14]
add eax, ecx
push 0
push 1
push ecx
call eax
test eax, eax
je 0x402e0a
mov dword [ebx + 0xc], 1
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret