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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x240
mov eax, dword [ebp + 8]
mov dword [esp + 0x5c], 1
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x60], 0x1000
mov edx, dword [esp + 0x60]
mov dword [esp + 0x64], 0
mov esi, dword [esp + 0x64]
mov dword [esp + 0x6c], 5
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x88], 0
mov dword [esp + 0x214], 0xe9
mov ebx, dword [esp + 0x214]
mov dword [esp + 0x94], 0xd6b5d6c
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x74], 0
mov dword [esp + 0x7c], 0xd2d8
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x80], 0x5c
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x84], 0xd6b5dac
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x68], 0xffff3d28
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x8c], 0x14
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x220], 0x1e
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x220]
mov word [esp + 0x226], 0x4017
mov byte [esp + 0x20f], 0xa7
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x78], eax
mov dword [esp + 0x90], 0x105c
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x210], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x238], eax
mov eax, esp
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x34]
mov dword [eax], ecx
mov ecx, 0x40dd80
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], esi
call fcn.004028e0
sub esp, 4
mov dword [esp + 0x218], eax
mov eax, esp
mov ecx, dword [esp + 0x38]
mov dword [eax], ecx
mov ecx, 0x40dd9f
call fcn.004028e0
sub esp, 4
mov dword [esp + 0x204], eax
mov ecx, dword [esp + 0x218]
mov eax, dword [esp + 0x204]
lea edx, [esp + 0x9c]
mov esi, esp
mov dword [esi + 8], edx
lea edx, [esp + 0x98]
mov dword [esi + 4], edx
mov dword [esi], eax
call fcn.00403790
sub esp, 0xc
lea ecx, [esp + 0xa0]
mov dword [esp], ecx
mov dword [esp + 0x1c], eax
call fcn.00402b90
mov eax, dword [esp + 0xb0]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x44]
sub ecx, edx
mov edx, dword [esp + 0x210]
mov esi, dword [esp + 0x48]
add edx, esi
mov byte [esp + 0x22f], 0xf6
mov dword [esp + 0x230], 0
mov esi, dword [esp + 0x238]
mov edi, dword [esp + 0x4c]
sub esi, edi
mov edi, esp
mov dword [edi + 0xc], esi
mov dword [edi + 8], edx
mov dword [edi + 4], ecx
mov dword [edi], 0
call eax
sub esp, 0x10
mov dword [esp + 0x200], eax
mov dword [esp + 0x234], 0
mov ecx, dword [esp + 0x98]
lea eax, [esp + 0xa0]
mov edx, esp
mov dword [edx], eax
call fcn.00403dc0
sub esp, 4
lea ecx, [0x404d60]
mov dword [esp + 0x208], ecx
mov ecx, dword [esp + 0x200]
mov byte [esp + 0x5b], 0xe6
mov dword [esp + 0x21c], ecx
mov ecx, dword [esp + 0x208]
movzx ecx, byte [ecx]
mov edx, dword [esp + 0x2c]
cmp ecx, edx
mov dword [esp + 0x18], eax
jne 0x4057db
mov al, 0
mov ecx, 0
mov edx, dword [esp + 0x208]
mov esi, dword [esp + 0x28]
add esi, dword [edx + 1]
mov edx, dword [esp + 0x208]
sub ecx, dword [esp + 0x88]
sub al, byte [esp + 0x22f]
mov byte [esp + 0x22f], al
add edx, esi
mov dword [esp + 0x208], edx
mov dword [esp + 0x74], ecx
mov ax, 0
sub ax, word [esp + 0x226]
mov word [esp + 0x226], ax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x228], ecx
mov eax, dword [esp + 0x228]
mov cl, byte [esp + 0x20f]
and cl, 0x37
mov byte [esp + 0x20f], cl
mov edx, dword [esp + 0x230]
add edx, 0
mov dword [esp + 0x230], edx
mov edx, dword [esp + 0x24]
cmp eax, edx
jae 0x40588d
mov eax, dword [esp + 0x228]
mov dword [esp + 0x88], 0
mov ecx, dword [esp + 0x208]
mov dl, byte [ecx + eax]
mov eax, dword [esp + 0x228]
mov ecx, dword [esp + 0x21c]
mov byte [ecx + eax], dl
mov eax, dword [esp + 0x228]
mov ecx, dword [esp + 0x30]
add eax, ecx
mov edx, dword [esp + 0x74]
mov esi, dword [esp + 0x230]
mov dword [esp + 0x74], esi
xor edx, 0
mov dword [esp + 0x74], edx
mov dword [esp + 0x228], eax
jmp 0x4057fa
lea eax, [esp + 0xa0]
mov dword [esp], eax
call fcn.00402060
lea eax, [esp + 0x234]
lea ecx, [esp + 0xa0]
mov dl, byte [esp + 0x5b]
add dl, 0x4c
mov esi, dword [esp + 0x200]
mov edi, dword [esp + 0x234]
and edi, 0
mov dword [esp + 0x234], edi
mov dword [esp], ecx
mov dword [esp + 0x14], eax
mov byte [esp + 0x13], dl
call esi
mov eax, dword [esp + 0x230]
mov ecx, dword [esp + 0x14]
sub ecx, eax
mov dl, byte [esp + 0x13]
mov byte [esp + 0x22f], dl
mov dword [esp + 0x234], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret