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, 0x220
mov eax, dword [ebp + 8]
mov dword [esp + 0x34], 1
mov dword [esp + 0x58], 0
xor ecx, ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x218], 0x1000
mov esi, 0x1000
mov dword [esp + 0x5c], 0
mov dword [esp + 0x40], 5
mov byte [esp + 0x1ef], 0xad
mov edi, dword [esp + 0x40]
mov dword [esp + 0x60], 0
mov dword [esp + 0x80], 0xe9
mov ebx, 0xe9
mov dword [esp + 0x204], 0
mov dword [esp + 0x200], 0x97ca8484
mov dword [esp + 0x50], 0x598d
mov dword [esp + 0x64], 0xac
mov dword [esp + 0x68], 0x97ca84c4
mov dword [esp + 0x1f0], 0
mov dword [esp + 0x70], 0x10ac
mov dword [esp + 0x74], 0x18
mov dword [esp + 0x78], 0x1d
mov dword [esp + 0x1f4], eax
mov dword [esp + 0x1e8], 0x10ac
mov dword [esp + 0x4c], 0xffffb673
mov dword [esp + 0x6c], 0x97ca84c4
mov eax, esp
mov dword [eax], 0x1d
mov eax, 0x40dd30
mov dword [esp + 0x30], ecx
mov ecx, eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], esi
call fcn.004028f0
sub esp, 4
mov dword [esp + 0x20c], eax
mov eax, esp
mov dword [eax], 0x18
mov ecx, 0x40dd4e
call fcn.004028f0
sub esp, 4
mov dword [esp + 0x1f8], eax
mov ecx, dword [esp + 0x20c]
lea edx, [esp + 0x1e4]
mov esi, esp
mov dword [esi + 8], edx
lea edx, [esp + 0x3c]
mov dword [esi + 4], edx
mov dword [esi], eax
call fcn.00403780
sub esp, 0xc
lea ecx, [esp + 0x88]
mov edx, esp
mov dword [edx], ecx
mov dword [esp + 0x1c], eax
call fcn.00402b60
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x1e8]
mov edx, dword [esp + 0x4c]
add edx, 0x598d
mov esi, dword [esp + 0x6c]
add esi, 0x68357b7c
add ecx, 0xffffff54
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 word [esp + 0x86], 0x313d
mov dword [esp + 0x210], eax
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x88]
mov edx, esp
mov dword [edx], eax
call fcn.00403d40
sub esp, 4
lea ecx, [0x404cf0]
mov dword [esp + 0x214], 0
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x210]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x7c], 0
mov word [esp + 0x46], 0x26c7
movzx ecx, byte [ecx]
mov edx, dword [esp + 0x2c]
cmp ecx, edx
mov dword [esp + 0x18], eax
jne 0x40577d
mov eax, 0
lea ecx, [esp + 0x86]
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
add esi, dword [edx + 1]
mov edx, dword [esp + 0x38]
add edx, esi
mov di, word [esp + 0x86]
mov bx, cx
xor di, bx
sub eax, dword [esp + 0x58]
mov word [esp + 0x86], di
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x214]
mov dword [esp + 0x214], eax
mov eax, 0
lea ecx, [esp + 0x1f0]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x208], edx
mov esi, dword [esp + 0x7c]
xor esi, ecx
mov dword [esp + 0x1f0], esi
sub eax, dword [esp + 0x1f0]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
lea ecx, [esp + 0x214]
mov edx, dword [esp + 0x7c]
xor edx, ecx
mov dword [esp + 0x214], edx
mov ecx, dword [esp + 0x214]
and ecx, eax
mov dword [esp + 0x214], ecx
mov eax, dword [esp + 0x60]
add eax, 0
mov ecx, dword [esp + 0x208]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x20]
cmp ecx, eax
jae 0x405863
mov al, 0
mov ecx, dword [esp + 0x208]
mov edx, dword [esp + 0x38]
mov ah, byte [edx + ecx]
mov ecx, dword [esp + 0x208]
mov edx, dword [esp + 0x48]
sub al, byte [esp + 0x1ef]
mov word [esp + 0x86], 0x4cbd
mov byte [edx + ecx], ah
mov byte [esp + 0x1ef], al
lea eax, [esp + 0x1f0]
mov cl, byte [esp + 0x1ef]
mov dl, al
mov dword [esp + 0x1f0], 0
or cl, dl
mov byte [esp + 0x1ef], cl
mov eax, dword [esp + 0x208]
mov esi, dword [esp + 0x24]
add eax, esi
mov dword [esp + 0x208], eax
jmp 0x4057ac
lea eax, [esp + 0x88]
mov dword [esp], eax
call fcn.00402000
lea eax, [esp + 0x88]
mov ecx, 0
mov edx, dword [esp + 0x210]
sub ecx, dword [esp + 0x214]
mov dword [esp], eax
mov dword [esp + 0x14], ecx
call edx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x214], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret