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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x174
mov eax, dword [0x408028]
xor eax, esp
mov dword [esp + 0x170], eax
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [0x4083a8], ebx
jbe 0x40511d
mov edi, dword [0x408390]
xor esi, esi
mov eax, dword [0x4083a8]
lea ebx, [ebx]
cmp dword [esi + edi + 0x14], 0
je 0x405111
mov ecx, dword [esi + edi + 0x28]
mov eax, ecx
mov edx, dword [esi + edi + 0x2c]
or eax, edx
je 0x40510c
shrd ecx, edx, 0xa
cmp ecx, dword [0x408378]
jb 0x404f42
cmp dword [section..data], 5
jbe 0x4050ec
push 0x4000
push 0
call fcn.00405140
test al, al
je 0x4050ec
mov edx, dword [esi + edi]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x88]
mov dword [esp + 0x18], 0x1000000
mov dword [esp + 0x1c], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 8
mov dword [esp + 0x84], 0
call fcn.00406d9b
mov eax, dword [esi + edi + 0x28]
mov edx, 0x401c13
mov dword [esp + 0x20], eax
mov eax, dword [esi + edi + 0x2c]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
cmp dword [0x4083a8], 1
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 8
mov dword [esp + 0xa4], 0
mov eax, dword [esi + edi + 0x20]
mov dword [esp + 0x28], eax
mov eax, dword [esi + edi + 0x24]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x28]
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], 8
mov dword [esp + 0xb4], 0
mov eax, dword [esi + edi + 0x30]
mov dword [esp + 0x30], eax
mov eax, dword [esi + edi + 0x34]
sete byte [esp + 0xe]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x30]
mov dword [esp + 0xb8], eax
lea eax, [esp + 0xe]
mov dword [esp + 0xc8], eax
mov eax, dword [0x4083b4]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
mov dword [esp + 0xd8], eax
lea eax, [esp + 0x58]
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc0], 8
mov dword [esp + 0xc4], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 1
mov dword [esp + 0xd4], 0
mov dword [esp + 0xdc], 0
mov dword [esp + 0xe0], 4
mov dword [esp + 0xe4], 0
jmp 0x4050db
cmp dword [section..data], 5
jbe 0x4050ec
push 0x2000
push 0
call fcn.00405140
test al, al
je 0x4050ec
mov edx, dword [esi + edi]
lea eax, [esp + 0x38]
lea ecx, [esp + 0x118]
mov dword [esp + 0x38], 0x1000000
mov dword [esp + 0x3c], 0
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], 0
mov dword [esp + 0x110], 8
mov dword [esp + 0x114], 0
call fcn.00406d9b
mov eax, dword [esi + edi + 0x28]
mov edx, 0x401b8c
mov dword [esp + 0x40], eax
mov eax, dword [esi + edi + 0x2c]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x40]
cmp dword [0x4083a8], 1
mov dword [esp + 0x128], eax
mov dword [esp + 0x12c], 0
mov dword [esp + 0x130], 8
mov dword [esp + 0x134], 0
mov eax, dword [esi + edi + 0x20]
mov dword [esp + 0x48], eax
mov eax, dword [esi + edi + 0x24]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x138], eax
mov dword [esp + 0x13c], 0
mov dword [esp + 0x140], 8
mov dword [esp + 0x144], 0
mov eax, dword [esi + edi + 0x30]
mov dword [esp + 0x50], eax
mov eax, dword [esi + edi + 0x34]
sete byte [esp + 0xf]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x148], eax
lea eax, [esp + 0xf]
mov dword [esp + 0x158], eax
mov eax, dword [0x4083b4]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
mov dword [esp + 0x168], eax
lea eax, [esp + 0xe8]
mov dword [esp + 0x14c], 0
mov dword [esp + 0x150], 8
mov dword [esp + 0x154], 0
mov dword [esp + 0x15c], 0
mov dword [esp + 0x160], 1
mov dword [esp + 0x164], 0
mov dword [esp + 0x16c], 0
mov dword [esp + 0x170], 4
mov dword [esp + 0x174], 0
push eax
push 9
sub esp, 8
call fcn.00406de6
mov edi, dword [0x408390]
cmp dword [0x4083b4], 0
mov eax, dword [0x4083a8]
jne 0x405111
mov dword [esi + edi + 0x20], 0
mov dword [esi + edi + 0x24], 0
jmp 0x405111
mov eax, dword [0x4083a8]
inc ebx
add esi, 0x40
cmp ebx, eax
jb 0x404d80
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405790
mov esp, ebp
pop ebp
ret