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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [esp + 0x78]
cmp word [eax - 2], 0xffff
jne 0x4081ef
mov edx, 0xffffffff
mov ecx, eax
jmp 0x407e51
mov edx, eax
lea eax, [edx - 1]
cmp word [ecx + eax*2], 0xffff
je 0x407e4f
lea eax, [edx + 0xf]
mov dword [esp + 0x40], eax
movzx ecx, byte [esp + 0x74]
mov eax, 1
mov edi, eax
shl edi, cl
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x40]
cmp dword [esp + 0x74], edi
jle 0x4081da
mov ecx, edi
mov dword [esp + 0x38], edi
shl eax, cl
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], 1
mov ebp, 2
mov dword [esp + 0x1c], pe_nt_image_headers32
mov dword [esp + 0x2c], 0
mov eax, dword [esp + 0x30]
lea edi, [eax - 0x10]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x7c]
movzx edi, word [edi + eax*2]
test edi, edi
mov edx, edi
mov dword [esp + 0x34], edi
je 0x407f5a
mov esi, eax
mov eax, dword [esp + 0x2c]
lea ebx, [ebp*4]
mov dword [esp + 0x24], edx
neg ebx
lea edi, [eax + 0x469620]
mov eax, dword [esp + 0x20]
sub eax, ebp
shl eax, 2
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x78]
movzx eax, word [eax + edx*2]
mov edx, dword [esp + 0x28]
mov ecx, eax
mov dword [esp + 0x18], eax
movzx eax, byte [edi]
mov word [esp + 0x10], cx
lea eax, [edx + eax*4]
add eax, dword [esp + 0x70]
mov edx, dword [esp + 0x20]
nop
lea esi, [esi]
mov ecx, esi
sub edx, ebp
mov byte [eax], cl
movzx ecx, word [esp + 0x10]
mov word [eax + 2], cx
add eax, ebx
test edx, edx
jg 0x407f20
add edi, dword [esp + 0x1c]
sub dword [esp + 0x24], 1
jne 0x407ef2
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
sub eax, 1
imul eax, edi
add edx, edi
add eax, edx
mov dword [esp + 0x2c], eax
add dword [esp + 0x30], 1
add ebp, ebp
shr dword [esp + 0x1c], 1
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x38], eax
jge 0x407eab
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
cmp eax, edi
je 0x407fa5
mov esi, dword [esp + 0x70]
mov ebx, eax
lea eax, [ebx*4]
mov dword [esp + 4], esi
add ebx, ebx
lea edx, [esi + eax]
mov dword [esp + 8], eax
mov dword [esp], edx
call sub.msvcrt.dll_memcpy
cmp edi, ebx
jne 0x407f85
mov eax, dword [esp + 0x74]
mov edi, dword [esp + 0x40]
lea ecx, [eax - 1]
mov eax, pe_nt_image_headers32
shr eax, cl
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x74]
lea ebp, [eax + 1]
cmp ebp, edi
jg 0x4081fc
mov eax, 0xf
sub eax, dword [esp + 0x74]
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x7c]
mov dword [esp + 0x40], 1
mov dword [esp + 0x28], pe_nt_image_headers32
mov dword [esp + 0x18], 0x100
mov esi, eax
mov dword [esp + 0x44], eax
mov eax, 1
mov ecx, esi
shl eax, cl
mov dword [esp + 0x48], eax
mov eax, edi
mov edi, 2
add eax, 1
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
cmp word [ebp + eax*2], 0
lea esi, [eax - 0x10]
mov dword [esp + 0x1c], esi
je 0x4080d9
movzx eax, byte [esp + 0x74]
mov ebx, dword [esp + 0x40]
mov ecx, ebx
mov esi, ebx
lea ebx, [edi*4]
mov byte [esp + 0x34], al
mov eax, 1
shl eax, cl
neg ebx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
cmp eax, 0x100
je 0x408103
movzx eax, byte [eax + 0x469620]
shl eax, 2
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x1c]
movzx edx, word [ecx + edx*2]
mov ecx, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x14]
mov word [esp + 0x10], cx
sub edx, edi
lea eax, [eax + edx*4]
add eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov ecx, esi
sub edx, edi
mov byte [eax], cl
movzx ecx, word [esp + 0x10]
mov word [eax + 2], cx
add eax, ebx
test edx, edx
jg 0x4080a1
mov ecx, dword [esp + 0x28]
add dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x24]
movzx eax, word [ebp + ecx*2]
mov word [esp + 0x10], ax
sub eax, 1
test ax, ax
mov word [ebp + ecx*2], ax
jne 0x408060
add dword [esp + 0x24], 1
add edi, edi
shr dword [esp + 0x28], 1
mov eax, dword [esp + 0x24]
add dword [esp + 0x40], 1
cmp eax, dword [esp + 0x4c]
jne 0x408024
mov eax, dword [esp + 0x38]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp ecx, 0xf
je 0x408146
movzx eax, word [ebp + ecx*2]
mov edx, dword [esp + 0x30]
sub edx, eax
test edx, edx
mov eax, edx
jg 0x40813c
jmp 0x4081c5
movzx edx, word [ebp + ecx*2]
sub eax, edx
test eax, eax
jle 0x4081b0
add ecx, 1
add eax, eax
cmp ecx, 0xf
jne 0x408131
mov eax, dword [esp + 0x44]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
add dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], 0
movzx edx, byte [eax + 0x469620]
add eax, ecx
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
movzx eax, dl
lea ecx, [ecx + eax*4]
movzx eax, byte [esp + 0x10]
add al, byte [esp + 0x34]
mov byte [ecx], al
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x70]
sar eax, 2
sub eax, edx
mov word [ecx + 2], ax
xor eax, eax
jmp 0x408079
sub ecx, dword [esp + 0x74]
mov eax, 1
shl eax, cl
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x408156
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x14], eax
jmp 0x408156
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x38], eax
jmp 0x407e8e
mov dword [esp + 0x40], 0xf
jmp 0x407e62
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret