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

Disassembly:
sub esp, 0x218
push ebx
mov ebx, dword [esp + 0x220]
push ebp
mov ebp, dword [esp + 0x228]
add ebp, 0x528
push edi
push 0
mov dword [esp + 0x10], ebp
mov edi, dword [ebp + 0x3c]
add edi, ebp
mov dword [esp + 0x20], edi
call dword [ebx + 0x38]
mov cx, word [edi + 4]
mov edx, dword [eax + 0x3c]
cmp cx, word [edx + eax + 4]
jne 0x402bd6
push esi
push 0x40
mov eax, 0x3000
mov ecx, 0x1000
push eax
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x50]
add eax, ecx
push eax
push 0
call dword [ebx + 0x3c]
mov esi, eax
test esi, esi
je 0x402bd5
push dword [edi + 0x54]
push ebp
push esi
call fcn.004034d1
movzx ebp, word [edi + 0x14]
xor eax, eax
and dword [esp + 0x20], 0
add esp, 0xc
add ebp, 0x2c
cmp ax, word [edi + 6]
jae 0x4028c9
mov ebx, dword [esp + 0x10]
add ebp, edi
push dword [ebp - 4]
mov eax, dword [ebp]
add eax, ebx
push eax
mov eax, dword [ebp - 8]
add eax, esi
push eax
call fcn.004034d1
mov ecx, dword [esp + 0x20]
lea ebp, [ebp + 0x28]
movzx eax, word [edi + 6]
add esp, 0xc
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, eax
jb 0x402897
mov ebx, dword [esp + 0x22c]
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x40292c
lea ecx, [eax + esi]
mov eax, esi
sub eax, dword [edi + 0x34]
cmp dword [ecx], 0
mov dword [esp + 0x10], eax
je 0x40292c
lea edx, [ecx + 8]
jmp 0x40291c
movzx eax, word [edx]
mov ebp, eax
and eax, 0xf000
cmp ax, word [esp + 0x18]
jne 0x40290b
mov eax, dword [esp + 0x10]
and ebp, 0xfff
add ebp, dword [ecx]
add dword [esi + ebp], eax
jmp 0x402919
mov eax, 0x1000
cmp bp, ax
jae 0x402bca
add edx, 2
mov eax, dword [ecx + 4]
add eax, ecx
cmp edx, eax
jne 0x4028e9
cmp dword [edx], 0
mov ecx, edx
jne 0x4028e4
mov eax, dword [edi + 0x80]
test eax, eax
je 0x4029e0
lea ebp, [eax + esi]
cmp dword [ebp + 0xc], 0
mov dword [esp + 0x10], ebp
je 0x4029e0
mov edi, dword [esp + 0x230]
mov eax, dword [ebp + 0xc]
add eax, esi
push eax
call dword [ebx + 0x30]
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
add edx, esi
mov eax, dword [ebp]
add eax, esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x4029cb
mov ebp, edx
jns 0x402980
movzx eax, cx
jmp 0x4029a8
lea eax, [esi + 2]
add eax, ecx
cmp dword [edi + 4], 0
mov dword [esp + 0x1c], eax
je 0x4029a8
push eax
push ebx
call fcn.00401e81
pop ecx
pop ecx
test eax, eax
je 0x4029a4
mov eax, dword [ebx + 0xe0]
jmp 0x4029b0
mov eax, dword [esp + 0x1c]
push eax
push dword [esp + 0x18]
call dword [ebx + 0x34]
mov dword [ebp], eax
add ebp, 4
mov eax, dword [esp + 0x18]
add eax, 4
mov dword [esp + 0x18], eax
mov ecx, dword [eax]
test ecx, ecx
jne 0x402979
mov ebp, dword [esp + 0x10]
add ebp, 0x14
mov dword [esp + 0x10], ebp
cmp dword [ebp + 0xc], 0
jne 0x402952
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0xe0]
test eax, eax
je 0x402a61
lea ebp, [esi + 4]
add ebp, eax
mov dword [esp + 0x18], ebp
mov eax, dword [ebp]
test eax, eax
je 0x402a61
add eax, esi
push eax
call dword [ebx + 0x30]
mov dword [esp + 0x10], eax
test eax, eax
je 0x402a4f
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
add ecx, esi
add edx, esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
mov eax, dword [ecx]
test eax, eax
je 0x402a4f
mov edi, ecx
mov ebp, edx
mov ecx, dword [ebx + 0x34]
test eax, eax
jns 0x402a30
movzx eax, ax
jmp 0x402a35
add eax, 2
add eax, esi
push eax
push dword [esp + 0x14]
call ecx
add edi, 4
mov dword [ebp], eax
add ebp, 4
mov eax, dword [edi]
test eax, eax
jne 0x402a24
mov ebp, dword [esp + 0x18]
add ebp, 0x20
mov dword [esp + 0x18], ebp
mov eax, dword [ebp]
test eax, eax
jne 0x4029fa
mov edi, dword [esp + 0x20]
mov ebp, dword [edi + 0xc0]
test ebp, ebp
je 0x402a86
mov ebp, dword [esi + ebp + 0xc]
test ebp, ebp
je 0x402a86
jmp 0x402a7f
push 0
push 1
push esi
call eax
lea ebp, [ebp + 4]
mov eax, dword [ebp]
test eax, eax
jne 0x402a75
mov eax, dword [esp + 0x230]
mov ebp, dword [edi + 0x28]
add ebp, esi
cmp dword [eax], 3
jne 0x402b78
push 0
push 1
push esi
call ebp
mov edx, dword [esp + 0x230]
add edx, 0x30c
mov dword [esp + 0x1c], edx
cmp byte [edx], 0
je 0x402bca
mov ecx, dword [edi + 0x78]
test ecx, ecx
je 0x402bca
mov edi, dword [ecx + esi + 0x18]
test edi, edi
je 0x402bca
mov eax, dword [ecx + esi + 0x1c]
lea ebp, [edi - 1]
add eax, esi
mov dword [esp + 0x10], eax
mov eax, dword [ecx + esi + 0x20]
mov ecx, dword [ecx + esi + 0x24]
add eax, esi
add ecx, esi
mov dword [esp + 0x20], ecx
lea ebp, [eax + ebp*4]
mov eax, dword [ebp]
add eax, esi
push edx
push eax
call fcn.0040350a
pop ecx
pop ecx
test eax, eax
je 0x402b17
sub ebp, 4
sub edi, 1
je 0x402bca
mov edx, dword [esp + 0x1c]
jmp 0x402af3
mov eax, dword [esp + 0x20]
movzx eax, word [eax + edi*2 - 2]
mov edi, dword [esp + 0x10]
mov edi, dword [edi + eax*4]
add edi, esi
je 0x402bca
mov eax, dword [esp + 0x230]
lea ebp, [eax + 0x40c]
cmp byte [ebp], 0
je 0x402b74
cmp dword [eax + 0x50c], 0
je 0x402b5a
lea eax, [esp + 0x24]
push eax
push ebp
push ebx
call fcn.00402fe1
add esp, 0xc
mov ecx, dword [esp + 0x230]
lea eax, [esp + 0x24]
cmp dword [ecx + 0x50c], 0
cmove eax, ebp
push eax
call edi
jmp 0x402bca
call edi
jmp 0x402bca
add eax, 0x40c
cmp byte [eax], 0
je 0x402b9c
lea ecx, [esp + 0x24]
push ecx
push eax
push ebx
call fcn.00402fe1
lea eax, [esp + 0x30]
push eax
push ebx
call fcn.00402da3
add esp, 0x14
mov eax, dword [esp + 0x230]
xor ecx, ecx
cmp dword [eax + 4], ecx
je 0x402bbf
push ecx
push ecx
push ecx
push ebp
push ecx
push ecx
call dword [ebx + 0x5c]
test eax, eax
je 0x402bca
push 0xffffffffffffffff
push eax
call dword [ebx + 0x58]
jmp 0x402bca
mov eax, dword fs:[0x18]
push dword [eax + 0x30]
call ebp
push 0xc000
push 0
push esi
call dword [ebx + 0x40]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x218
ret