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

Disassembly:
mov word [ebp + edx*2], si
movzx esi, word [ebx + edx*2 + 2]
inc edx
test si, si
jne 0x20404156
jmp 0x2040416f
add edx, ecx
add edx, eax
mov esi, dword [esp + 0xc]
mov word [edi + edx*2], 0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [esi + 0x5c]
cmp eax, 0xffffffff
je 0x2040451c
mov esi, eax
push 0
push eax
mov ebp, dword [esp + 0x14]
call dword [ebp + 0xc]
test eax, eax
je 0x204043ac
mov edi, eax
inc eax
push eax
push 0x40
call dword [ebp + 0x6c]
mov ebx, eax
lea eax, [esp + 0x54]
push 0
push eax
push edi
push ebx
push esi
call dword [ebp + 0x64]
mov dword [esp + 0x10], eax
push esi
call dword [ebp + 0x2c]
cmp dword [esp + 0x10], 0
je 0x2040451c
mov esi, dword [esp + 8]
lea edx, [esi + 0x134]
lea ecx, [esp + 0x54]
push 4
call fcn.20404626
add esp, 4
lea edx, [esi + 0x14]
lea ecx, [esp + 0x58]
push 4
call fcn.20404626
add esp, 4
lea eax, [edi - 8]
cmp eax, 8
je 0x2040451c
lea ecx, [edi + ebx]
mov dword [esp + 0x30], ecx
lea ecx, [edi + ebx - 9]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], 0
xor ebp, ebp
mov dword [esp + 0x24], 0
xor esi, esi
movzx ecx, byte [esp + 0x54]
movzx edx, byte [esp + 0x55]
mov ch, byte [esp + 0x56]
mov dh, byte [esp + 0x57]
mov byte [esp + 0x10], dh
mov dh, byte [esp + 0x58]
mov byte [esp], dh
mov dh, byte [esp + 0x59]
mov byte [esp + 4], dh
mov dh, byte [esp + 0x5a]
mov byte [esp + 0x20], dh
mov dh, byte [esp + 0x5b]
mov byte [esp + 0x1c], dh
add eax, 0xfffffff8
xor edi, edi
jmp 0x2040427f
inc edi
cmp eax, edi
je 0x20404527
cmp byte [ebx + edi + 1], cl
je 0x2040428a
cmp cl, 0x3f
jne 0x20404276
cmp byte [ebx + edi + 2], dl
je 0x20404295
cmp dl, 0x3f
jne 0x20404276
cmp byte [ebx + edi + 3], ch
je 0x204042a0
cmp ch, 0x3f
jne 0x20404276
mov dh, byte [esp + 0x10]
cmp byte [ebx + edi + 4], dh
je 0x204042b1
cmp byte [esp + 0x10], 0x3f
jne 0x20404276
mov dh, byte [esp]
cmp byte [ebx + edi + 5], dh
je 0x204042c0
cmp byte [esp], 0x3f
jne 0x20404276
mov dh, byte [esp + 4]
cmp byte [ebx + edi + 6], dh
je 0x204042d1
cmp byte [esp + 4], 0x3f
jne 0x20404276
mov dh, byte [esp + 0x20]
cmp byte [ebx + edi + 7], dh
je 0x204042e2
cmp byte [esp + 0x20], 0x3f
jne 0x20404276
mov dh, byte [esp + 0x1c]
cmp byte [ebx + edi + 8], dh
je 0x204042f3
cmp byte [esp + 0x1c], 0x3f
jne 0x20404276
mov edx, ebp
lea eax, [ebx + edi + 9]
mov dword [esp + 0x10], eax
mov ebp, dword [ebx + edi + 1]
mov eax, dword [ebx + edi + 9]
bswap ebp
mov ecx, dword [esp + 8]
cmp eax, dword [ecx + 0x128]
jne 0x2040434d
test edx, edx
jne 0x2040434d
mov eax, dword [ebx + edi + 0x11]
add eax, 0x10
mov dword [esp + 0x24], eax
push eax
push 0x40
mov eax, dword [esp + 0x14]
call dword [eax + 0x6c]
mov dword [esp + 0x1c], eax
mov ecx, eax
mov esi, dword [esp + 0x10]
mov edx, esi
push ebp
call fcn.20404626
mov edx, esi
add esp, 4
add dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x1c]
jmp 0x20404388
test edx, edx
je 0x20404384
mov ecx, dword [esp + 0x28]
lea eax, [ebp + ecx]
mov dword [esp], eax
cmp eax, dword [esp + 0x24]
ja 0x2040455e
mov eax, edx
add ecx, edx
mov edx, dword [esp + 0x10]
push ebp
mov ebp, eax
call fcn.20404626
add esp, 4
mov edx, esi
mov eax, dword [esp]
mov dword [esp + 0x28], eax
jmp 0x20404388
xor ebp, ebp
mov edx, esi
mov eax, dword [esp + 0x2c]
sub eax, ebx
sub eax, edi
mov ecx, dword [esp + 0x30]
sub ecx, ebx
add ecx, 0xffffffef
cmp ecx, edi
lea ebx, [ebx + edi + 1]
mov esi, edx
salc
jne 0x20404233
jmp 0x20404529
push esi
call dword [ebp + 0x2c]
jmp 0x2040451c