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

Disassembly:
push esi
push edi
push ebx
push ebp
sub esp, 0x30
mov eax, dword fs:[0x30]
mov esi, dword [eax + 0xc]
add esi, 0xc
mov edx, dword [esi]
cmp edx, esi
je 0x401cf8
xor ecx, ecx
mov ebx, dword [edx + 0x30]
mov ebp, ecx
movzx eax, word [ebx]
test eax, eax
je 0x401ce0
mov dword [esp], esi
mov eax, ecx
movzx edi, word [ebx + eax*2]
cmp edi, 0x41
jl 0x401ccf
cmp edi, 0x5a
lea esi, [edi + 0x20]
jg 0x401ccf
mov edi, esi
inc eax
movzx esi, di
add ebp, esi
movzx edi, word [ebx + eax*2]
test edi, edi
jne 0x401cbc
mov esi, dword [esp]
and ebp, 0x7fffffff
cmp ebp, 0x450
je 0x40272a
mov edx, dword [edx]
cmp edx, esi
jne 0x401cab
xor ebx, ebx
mov ebp, dword [ebx + 0x3c]
add ebp, ebx
mov edi, dword [0x4ea2bf]
mov ecx, dword [0x4ea2db]
mov esi, dword [0x4ea2b3]
mov dword [esp + 4], ecx
mov eax, dword [ebp + esi*8 + 0x78]
mov ecx, dword [eax + ebx + 0x20]
mov ebp, dword [eax + ebx + 0x1c]
add ecx, ebx
mov esi, dword [eax + ebx + 0x24]
add ebp, ebx
mov edx, dword [eax + ebx + 0x18]
add esi, ebx
test edx, edx
jbe 0x401dce
mov dword [esp + 8], esi
xor eax, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0xc], edx
mov dword [esp], ebp
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edi
mov esi, dword [esp + 4]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
add edi, dword [edx + eax*4]
cmp byte [edi], 0
je 0x401db7
xor ebp, ebp
inc ebp
cmp byte [ebp + edi], 0
jne 0x401d66
test ebp, ebp
je 0x401db7
mov ebx, ebp
xor ecx, ecx
shr ebx, 1
je 0x4025d2
mov dword [esp + 4], eax
xor edx, edx
imul ecx, esi
movzx eax, byte [edi + edx*2]
add ecx, eax
imul ecx, esi
movzx eax, byte [edi + edx*2 + 1]
inc edx
add ecx, eax
cmp edx, ebx
jb 0x401d84
mov eax, dword [esp + 4]
lea ebx, [edx + edx + 1]
lea edx, [ebx - 1]
cmp edx, ebp
jae 0x401db9
imul ecx, esi
movzx edx, byte [ebx + edi - 1]
add ecx, edx
jmp 0x401db9
xor ecx, ecx
cmp ecx, dword [esp + 0x10]
je 0x40270c
inc eax
cmp eax, dword [esp + 0xc]
jb 0x401d54
mov ebx, dword [esp + 0x24]
mov dword [esp + 4], 0
mov eax, dword [0x4ea2c3]
push eax
push 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov ebp, eax
mov ecx, ebp
mov edx, dword [0x4ea2c3]
call fcn.00402740
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov esi, dword [0x4ea2ef]
mov edi, dword [0x4ea2db]
mov edx, dword [0x4ea2b3]
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edi
mov eax, dword [eax + edx*8 + 0x78]
mov esi, dword [eax + ebx + 0x20]
mov edi, dword [eax + ebx + 0x1c]
add esi, ebx
mov ecx, dword [eax + ebx + 0x24]
add edi, ebx
mov edx, dword [eax + ebx + 0x18]
add ecx, ebx
test edx, edx
jbe 0x401ece
mov dword [esp + 0x1c], esi
xor eax, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], ebp
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
add edi, dword [edx + eax*4]
cmp byte [edi], 0
je 0x401eb4
xor ebp, ebp
inc ebp
cmp byte [ebp + edi], 0
jne 0x401e63
test ebp, ebp
je 0x401eb4
mov ebx, ebp
xor ecx, ecx
shr ebx, 1
je 0x4025dc
mov dword [esp + 0x10], eax
xor edx, edx
imul ecx, esi
movzx eax, byte [edi + edx*2]
add ecx, eax
imul ecx, esi
movzx eax, byte [edi + edx*2 + 1]
inc edx
add ecx, eax
cmp edx, ebx
jb 0x401e81
mov eax, dword [esp + 0x10]
lea ebx, [edx + edx + 1]
lea edx, [ebx - 1]
cmp edx, ebp
jae 0x401eb6
imul ecx, esi
movzx edx, byte [ebx + edi - 1]
add ecx, edx
jmp 0x401eb6
xor ecx, ecx
cmp ecx, dword [esp + 0x18]
je 0x4026ef
inc eax
cmp eax, dword [esp + 0x14]
jb 0x401e51
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp]
xor eax, eax
push 0x104
push ebp
push 0
call eax
movzx edx, word [ebp]
test edx, edx
je 0x401ef0
xor eax, eax
inc eax
movzx esi, word [ebp + eax*2]
test esi, esi
jne 0x401ee4
test edx, edx
mov edx, dword [0x4ea2b7]
mov eax, 0
je 0x4026e8
inc eax
lea esi, [ebp + eax*2]
movzx edi, word [esi]
test edi, edi
jne 0x401f01
mov edi, dword [0x4ea2bb]
movzx esi, word [esi - 2]
cmp si, di
je 0x401f34
xor ecx, ecx
mov word [ebp + eax*2], cx
dec eax
mov edi, dword [0x4ea2bb]
movzx esi, word [ebp + eax*2 - 2]
cmp si, di
jne 0x401f1e
cmp byte [edx], 0
je 0x401f4c
xor esi, esi
movsx edi, byte [esi + edx]
inc esi
mov word [ebp + eax*2], di
inc eax
cmp byte [esi + edx], 0
jne 0x401f3b
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov esi, dword [0x4ea2c7]
mov edi, dword [0x4ea2db]
mov edx, dword [0x4ea2b3]
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edi
mov eax, dword [eax + edx*8 + 0x78]
mov esi, dword [eax + ebx + 0x20]
mov edi, dword [eax + ebx + 0x1c]
add esi, ebx
mov ecx, dword [eax + ebx + 0x24]
add edi, ebx
mov edx, dword [eax + ebx + 0x18]
add ecx, ebx
test edx, edx
jbe 0x402027
mov dword [esp + 0x1c], esi
xor eax, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], ebp
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
add edi, dword [edx + eax*4]
cmp byte [edi], 0
je 0x40200d
xor ebp, ebp
inc ebp
cmp byte [ebp + edi], 0
jne 0x401fbc
test ebp, ebp
je 0x40200d
mov ebx, ebp
xor ecx, ecx
shr ebx, 1
je 0x4025e6
mov dword [esp + 0x10], eax
xor edx, edx
imul ecx, esi
movzx eax, byte [edi + edx*2]
add ecx, eax
imul ecx, esi
movzx eax, byte [edi + edx*2 + 1]
inc edx
add ecx, eax
cmp edx, ebx
jb 0x401fda
mov eax, dword [esp + 0x10]
lea ebx, [edx + edx + 1]
lea edx, [ebx - 1]
cmp edx, ebp
jae 0x40200f
imul ecx, esi
movzx edx, byte [ebx + edi - 1]
add ecx, edx
jmp 0x40200f
xor ecx, ecx
cmp ecx, dword [esp + 0x18]
je 0x4026cb
inc eax
cmp eax, dword [esp + 0x14]
jb 0x401faa
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp]
xor eax, eax
xor edx, edx
push edx
push 0x80
push 4
push edx
push 1
push 0x80000000
push ebp
call eax
mov dword [esp + 0x14], eax
mov ebp, dword [ebx + 0x3c]
add ebp, ebx
mov edi, dword [0x4ea2af]
mov ecx, dword [0x4ea2db]
mov esi, dword [0x4ea2b3]
mov dword [esp + 0xc], ecx
mov eax, dword [ebp + esi*8 + 0x78]
mov ecx, dword [eax + ebx + 0x20]
mov ebp, dword [eax + ebx + 0x1c]
add ecx, ebx
mov esi, dword [eax + ebx + 0x24]
add ebp, ebx
mov edx, dword [eax + ebx + 0x18]
add esi, ebx
test edx, edx
jbe 0x402116
mov dword [esp + 8], esi
xor eax, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], edx
mov dword [esp], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edi
mov esi, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
add edi, dword [edx + eax*4]
cmp byte [edi], 0
je 0x4020ff
xor ebp, ebp
inc ebp
cmp byte [ebp + edi], 0
jne 0x4020ae
test ebp, ebp
je 0x4020ff
mov ebx, ebp
xor ecx, ecx
shr ebx, 1
je 0x4025f0
mov dword [esp + 0xc], eax
xor edx, edx
imul ecx, esi
movzx eax, byte [edi + edx*2]
add ecx, eax
imul ecx, esi
movzx eax, byte [edi + edx*2 + 1]
inc edx
add ecx, eax
cmp edx, ebx
jb 0x4020cc
mov eax, dword [esp + 0xc]
lea ebx, [edx + edx + 1]
lea edx, [ebx - 1]
cmp edx, ebp
jae 0x402101
imul ecx, esi
movzx edx, byte [ebx + edi - 1]
add ecx, edx
jmp 0x402101
xor ecx, ecx
cmp ecx, dword [esp + 0x18]
je 0x4026b1
inc eax
cmp eax, dword [esp + 0x10]
jb 0x40209c
mov ebx, dword [esp + 0x24]
xor eax, eax
push 0
push dword [esp + 0x18]
call eax
mov ebp, eax
mov eax, dword [0x4ea2b3]
cmp ebp, eax
jne 0x402131
push 1
call dword [esp + 8]
push 4
push 0x1000
mov eax, dword [0x4ea2e3]
push eax
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov esi, eax
mov edi, dword [ebx + 0x3c]
add edi, ebx
mov eax, dword [0x4ea2e7]
mov ecx, dword [0x4ea2db]
mov edx, dword [0x4ea2b3]
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
mov edx, dword [edi + edx*8 + 0x78]
mov ecx, dword [edx + ebx + 0x20]
mov eax, dword [edx + ebx + 0x1c]
add ecx, ebx
mov edi, dword [edx + ebx + 0x24]
add eax, ebx
mov edx, dword [edx + ebx + 0x18]
add edi, ebx
mov dword [esp + 0x1c], edx
test edx, edx
jbe 0x40222a
mov dword [esp + 0x10], esi
xor edx, edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 0x28], ecx
mov dword [esp], ebp
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
add edi, dword [eax + edx*4]
cmp byte [edi], 0
je 0x40220c
xor ebp, ebp
inc ebp
cmp byte [ebp + edi], 0
jne 0x4021bb
test ebp, ebp
je 0x40220c
mov ebx, ebp
xor ecx, ecx
shr ebx, 1
je 0x4025fa
mov dword [esp + 0x18], edx
xor eax, eax
imul ecx, esi
movzx edx, byte [edi + eax*2]
add ecx, edx
imul ecx, esi
movzx edx, byte [edi + eax*2 + 1]
inc eax
add ecx, edx
cmp eax, ebx
jb 0x4021d9
mov edx, dword [esp + 0x18]
lea ebx, [eax + eax + 1]
lea eax, [ebx - 1]
cmp eax, ebp
jae 0x40220e
imul ecx, esi
movzx eax, byte [ebx + edi - 1]
add ecx, eax
jmp 0x40220e
xor ecx, ecx
cmp ecx, dword [esp + 0x20]
je 0x402690
inc edx
cmp edx, dword [esp + 0x1c]
jb 0x4021a9
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov ebp, dword [esp]
xor edx, edx
xor eax, eax
lea ecx, [esp + 0x10]
mov dword [ecx], eax
push eax
push ecx
push ebp
push esi
push dword [esp + 0x24]
call edx
test eax, eax
jne 0x402248
push 1
call dword [esp + 8]
mov eax, dword [esp + 0x10]
mov edx, dword [0x4ea2eb]
add eax, esi
add esi, edx
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov edx, dword [esi + 4]
test eax, eax
jbe 0x40228b
mov ecx, eax
shr ecx, 1
je 0x402686
xor ebp, ebp
add dword [esi + ebp*8 + 8], edx
add dword [esi + ebp*8 + 0xc], edx
inc ebp
cmp ebp, ecx
jb 0x40226f
lea ebp, [ebp + ebp + 1]
lea ecx, [ebp - 1]
cmp ecx, eax
jae 0x40228b
add dword [esi + ebp*4 + 4], edx
mov ebp, dword [0x4ea2d7]
add ebp, esi
mov ecx, dword [0x4ea2db]
cmp byte [ebp + 1], 0
je 0x4022f1
xor edx, edx
inc edx
cmp byte [edx + ebp + 1], 0
jne 0x4022a1
test edx, edx
je 0x4022f1
mov esi, edx
xor eax, eax
shr esi, 1
je 0x402604
mov dword [esp], edx
xor edi, edi
imul eax, ecx
movzx edx, byte [ebp + edi*2 + 1]
add eax, edx
imul eax, ecx
movzx edx, byte [ebp + edi*2 + 2]
inc edi
add eax, edx
cmp edi, esi
jb 0x4022be
mov edx, dword [esp]
lea edi, [edi + edi + 1]
lea esi, [edi - 1]
cmp esi, edx
jae 0x4022f3
imul ecx, eax
movzx eax, byte [ebp + edi]
add eax, ecx
jmp 0x4022f3
xor eax, eax
mov esi, dword [ebx + 0x3c]
add esi, ebx
mov ecx, dword [0x4ea2db]
mov edi, dword [0x4ea2b3]
mov dword [esp + 0x18], ecx
mov edx, dword [esi + edi*8 + 0x78]
mov ecx, dword [edx + ebx + 0x20]
mov esi, dword [edx + ebx + 0x1c]
add ecx, ebx
mov edi, dword [edx + ebx + 0x24]
add esi, ebx
mov edx, dword [edx + ebx + 0x18]
add edi, ebx
mov dword [esp + 0x1c], edx
test edx, edx
jbe 0x4023c9
mov dword [esp], esi
xor edx, edx
mov dword [esp + 0x24], ebx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], eax
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
add edi, dword [eax + edx*4]
cmp byte [edi], 0
je 0x4023ae
xor ebp, ebp
inc ebp
cmp byte [ebp + edi], 0
jne 0x40235d
test ebp, ebp
je 0x4023ae
mov ebx, ebp
xor ecx, ecx
shr ebx, 1
je 0x40260e
mov dword [esp + 0x18], edx
xor eax, eax
imul ecx, esi
movzx edx, byte [edi + eax*2]
add ecx, edx
imul ecx, esi
movzx edx, byte [edi + eax*2 + 1]
inc eax
add ecx, edx
cmp eax, ebx
jb 0x40237b
mov edx, dword [esp + 0x18]
lea ebx, [eax + eax + 1]
lea eax, [ebx - 1]
cmp eax, ebp
jae 0x4023b0
imul ecx, esi
movzx eax, byte [ebx + edi - 1]
add ecx, eax
jmp 0x4023b0
xor ecx, ecx
cmp ecx, dword [esp + 0x20]
je 0x40265f
inc edx
cmp edx, dword [esp + 0x1c]
jb 0x40234b
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 8]
invalid
mov dword [esp + 0x18], 0
push 1
call dword [esp + 8]
movsx eax, byte [ebp]
add ebp, eax
mov ecx, dword [0x4ea2db]
cmp byte [ebp + 1], 0
je 0x40243a
xor edx, edx
inc edx
cmp byte [edx + ebp + 1], 0
jne 0x4023eb
test edx, edx
je 0x40243a
mov edi, edx
xor eax, eax
shr edi, 1
je 0x402618
mov dword [esp], edx
xor esi, esi
xor eax, eax
mov ebx, 1
jmp 0x401da4
mov ebx, 1
jmp 0x401ea1
mov ebx, 1
jmp 0x401ffa
mov ebx, 1
jmp 0x4020ec
mov ebx, 1
jmp 0x4021f9
mov edi, 1
jmp 0x4022de
mov ebx, 1
jmp 0x40239b
mov edi, 1
jmp 0x402428
mov edi, dword [esp + 0xc]
movzx eax, word [edi + edx*2]
mov ebx, dword [esp + 0x24]
mov edx, ebx
mov esi, dword [esp]
mov ebp, dword [esp + 8]
add edx, dword [esi + eax*4]
mov dword [esp + 0x18], edx
je 0x4023d1
jmp 0x4023d7
mov ebp, 1
jmp 0x402280
mov edi, dword [esp + 0xc]
movzx ecx, word [edi + edx*2]
mov ebx, dword [esp + 0x24]
mov edx, ebx
mov eax, dword [esp + 8]
mov esi, dword [esp + 0x10]
mov ebp, dword [esp]
and al, 3
adc al, 0x88
jmp 0x40222c
mov esi, dword [esp + 8]
movzx edx, word [esi + eax*2]
mov ebx, dword [esp + 0x24]
mov eax, ebx
mov ebp, dword [esp]
add eax, dword [ebp + edx*4]
jmp 0x402118
mov ecx, dword [esp + 0xc]
movzx edx, word [ecx + eax*2]
mov ebx, dword [esp + 0x24]
mov eax, ebx
mov edi, dword [esp + 8]
mov ebp, dword [esp]
add eax, dword [edi + edx*4]
jmp 0x402029
mov esi, ebp
jmp 0x401f0d
mov ecx, dword [esp + 0xc]
movzx edx, word [ecx + eax*2]
mov ebx, dword [esp + 0x24]
mov eax, ebx
mov edi, dword [esp + 8]
mov ebp, dword [esp]
add eax, dword [edi + edx*4]
jmp 0x401ed0
mov esi, dword [esp + 8]
movzx eax, word [esi + eax*2]
mov ebx, dword [esp + 0x24]
mov edx, ebx
mov ebp, dword [esp]
add edx, dword [ebp + eax*4]
mov dword [esp + 4], edx
jmp 0x401dd6
mov ebx, dword [edx + 0x18]
jmp 0x401cfa