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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov edi, dword [esp + 0x78]
push 0x4df40
call fcn.00408fc0
add esp, 4
mov dword [edi], 0
xor ebx, ebx
test eax, eax
je 0x4058fa
mov esi, eax
mov edx, dword [esp + 0x74]
mov edi, dword [esp + 0x70]
imul edx, dword [esp + 0x6c]
mov dword [esp + 4], 0
mov dword [esp + 0x10], 1
lea eax, [edx + 1]
mov ecx, 0xfffffffe
mov dword [esp + 0x1c], edx
sub ecx, edx
and ecx, edi
mov edx, edi
not edx
and edx, eax
imul edx, ecx
mov ecx, eax
and ecx, edi
or eax, edi
imul eax, ecx
add eax, edx
mov ebp, 0x79
cmp eax, 0x40
jl 0x4053ac
mov ecx, dword [esp + 0x1c]
mov eax, ecx
and eax, 1
xor ecx, 1
lea ebp, [ecx + eax*2]
imul ebp, dword [esp + 0x70]
add ebp, 0x39
mov dword [esp + 8], ebp
push ebp
call fcn.00408fc0
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
je 0x40576e
mov ecx, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 0x29
xor edi, edi
mov dl, 0x29
mov ebx, 0x29
jmp 0x405417
push ebp
push ecx
mov dword [esp + 0x28], ecx
call fcn.00408fe0
add esp, 8
test eax, eax
je 0x405449
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebp
mov ecx, eax
movzx edx, byte [esp + 3]
mov byte [eax + edi], dl
mov dword [esp + 4], esi
mov ebx, dword [esp + 0x18]
mov edi, esi
dec ebx
mov dword [esp + 0x18], ebx
mov edx, ebx
je 0x405457
lea esi, [edi + 1]
cmp esi, ebp
jbe 0x405401
cmp dword [esp + 0x10], 0
je 0x405445
mov byte [esp + 3], dl
mov dword [esp + 0x24], ebp
jmp 0x405434
cmp esi, ebp
jbe 0x4053e0
add ebp, ebp
cmp ebp, 0x81
jae 0x405430
mov ebp, 0x80
jmp 0x405430
mov esi, edi
jmp 0x40540c
mov ecx, dword [esp + 0x20]
mov eax, ecx
mov esi, edi
mov ebp, dword [esp + 0x24]
jmp 0x40540c
mov eax, dword [esp + 0x7c]
cmp eax, 0xa
jb 0x405465
mov eax, 0xa
mov esi, dword [eax*4 + 0x443a54]
mov edi, esi
or edi, 0x1000
mov ebx, dword [esp + 0x14]
mov dword [ebx], 0x405290
lea eax, [esp + 4]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edi
mov eax, esi
and eax, 0xfff
imul ecx, eax, 0x5556
add ecx, 0xaaac
shr ecx, 0x10
inc ecx
mov dword [ebx + 0xc], ecx
mov ecx, esi
shr ecx, 0xe
and ecx, 1
mov dword [ebx + 0x14], ecx
shr eax, 2
imul eax, eax, 0x5556
add eax, 0xaaac
shr eax, 0x10
inc eax
mov dword [ebx + 0x10], eax
lea eax, [ebx + 0x29272]
push 0x10000
push 0
push eax
call fcn.00409050
add esp, 0xc
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x1c], 0
lea eax, [ebx + 0x9272]
lea ecx, [ebx + 0x9273]
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x5c], 0
mov dword [ebx + 0x60], 0
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], eax
mov byte [ebx + 0x9272], 0
mov dword [ebx + 0x38], 8
lea eax, [ebx + 0x39272]
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], eax
mov dword [ebx + 0x6c], 0
mov dword [ebx + 0x54], 0
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x18], 1
xor edi, 0xffff7fff
or esi, 0x8000
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x74], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x80], 0
mov dword [ebx + 0x84], 0
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], 0
test edi, esi
jne 0x4055e5
lea eax, [ebx + 0x90]
push 0x8101
push 0
push eax
call fcn.00409050
add esp, 0xc
mov eax, ebx
add eax, 0x8192
push 0x280
push 0
push eax
call fcn.00409050
add esp, 0xc
lea ecx, [esp + 0x28]
cmp dword [esp + 0x70], 0
mov edi, ebx
jle 0x40567b
mov eax, dword [esp + 0x70]
lea esi, [eax - 1]
xor ebx, ebx
jmp 0x40564c
mov ecx, dword [esp + 0x1c]
imul eax, ecx
add eax, dword [esp + 0x68]
mov dword [esp + 0x28], ecx
push 0
push 0
push 0
push ebp
push eax
mov edi, dword [esp + 0x28]
push edi
call fcn.00403c60
mov ecx, ebp
add esp, 0x18
inc ebx
add esi, 0xffffffff
jae 0x40567b
mov dword [esp + 0x28], 1
push 0
push 0
push 0
mov ebp, ecx
push ecx
lea eax, [esp + 0x28]
push eax
push edi
call fcn.00403c60
add esp, 0x18
mov eax, ebx
cmp dword [esp + 0x80], 0
je 0x405620
mov eax, esi
jmp 0x405620
mov dword [esp + 0x28], 0
push 4
push 0
push 0
push ecx
push 0
push edi
mov esi, ecx
call fcn.00403c60
add esp, 0x18
cmp eax, 1
jne 0x40577c
mov ebp, dword [esp + 4]
lea ebx, [ebp - 0x29]
mov eax, dword [esp + 0x78]
mov dword [eax], ebx
push 0x29
push 0x443a85
mov edi, esi
push esi
call fcn.00408ff0
add esp, 0xc
mov eax, dword [esp + 0x6c]
mov byte [esp + 0x3a], ah
mov byte [esp + 0x3b], al
mov eax, dword [esp + 0x70]
mov byte [esp + 0x3e], ah
mov byte [esp + 0x3f], al
mov eax, dword [esp + 0x74]
movzx eax, byte [eax + 0x443a80]
mov byte [esp + 0x41], al
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x49], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x4a], al
mov byte [esp + 0x4b], bh
mov byte [esp + 0x4c], bl
mov ecx, 0xffffffff
mov eax, 0xd
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0x27]
mov esi, ecx
shr esi, 4
xor ecx, edx
and ecx, 0xf
xor esi, dword [ecx*4 + 0x443a14]
mov ecx, esi
shr ecx, 4
and esi, 0xf
shr edx, 4
xor edx, esi
xor ecx, dword [edx*4 + 0x443a14]
cmp eax, 0x1d
je 0x40578e
movzx edx, byte [esp + eax + 0x28]
mov esi, ecx
shr esi, 4
xor ecx, edx
and ecx, 0xf
xor esi, dword [ecx*4 + 0x443a14]
mov ecx, esi
shr ecx, 4
and esi, 0xf
shr edx, 4
xor edx, esi
xor ecx, dword [edx*4 + 0x443a14]
add eax, 2
jmp 0x405710
push esi
call fcn.00408fd0
add esp, 4
jmp 0x4058fa
push edi
call fcn.00408fd0
add esp, 4
push dword [esp + 0xc]
jmp 0x4058f0
lea eax, [ecx + ecx]
not eax
add eax, ecx
bswap eax
mov dword [esp + 0x45], eax
mov ebx, dword [esp + 0xc]
push 0x29
push edi
push ebx
call fcn.00408ff0
add esp, 0xc
lea edi, [ebp + 0x10]
mov esi, dword [esp + 8]
cmp edi, esi
jbe 0x405805
cmp dword [esp + 0x10], 0
jne 0x4057d4
jmp 0x4058d9
cmp edi, esi
jbe 0x4057e5
add esi, esi
cmp esi, 0x81
jae 0x4057d0
mov esi, 0x80
jmp 0x4057d0
push esi
push ebx
call fcn.00408fe0
add esp, 8
test eax, eax
je 0x4058d5
mov ebx, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov ebp, dword [esp + 4]
mov dword [ebx + ebp + 0xc], 0x826042ae
mov dword [ebx + ebp + 8], 0x444e4549
mov dword [ebx + ebp + 4], 0
mov dword [ebx + ebp], 0
mov dword [esp + 4], edi
mov ebx, dword [esp + 0x78]
mov ecx, dword [ebx]
mov eax, dword [esp + 0xc]
cmp ecx, 0xfffffffc
je 0x40588c
lea edx, [eax + 0x25]
mov esi, 0xfffffffb
sub esi, ecx
mov ecx, 0xffffffff
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [edx]
inc edx
mov ebp, ecx
shr ebp, 4
xor ecx, ebx
and ecx, 0xf
xor ebp, dword [ecx*4 + 0x443a14]
mov ecx, ebp
shr ecx, 4
and ebp, 0xf
shr ebx, 4
xor ebx, ebp
xor ecx, dword [ebx*4 + 0x443a14]
inc esi
cmp esi, 0xffffffff
jne 0x405850
lea edx, [ecx + ecx]
not edx
add edx, ecx
mov ebx, dword [esp + 0x78]
jmp 0x40588e
xor edx, edx
mov ecx, edx
shr ecx, 0x18
mov byte [eax + edi - 0x10], cl
mov eax, edx
shr eax, 0x10
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0xc]
mov byte [esi + ecx - 0xf], al
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov byte [ecx + eax - 0xe], dh
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov byte [ecx + eax - 0xd], dl
add dword [ebx], 0x39
push dword [esp + 0x14]
call fcn.00408fd0
add esp, 4
mov ebx, dword [esp + 0xc]
jmp 0x4058fa
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x78]
mov dword [eax], 0
push dword [esp + 0x14]
call fcn.00408fd0
add esp, 4
push ebx
call fcn.00408fd0
add esp, 4
xor ebx, ebx
mov eax, ebx
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret