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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc0
mov edi, dword [ebp + 0x24]
mov ebx, dword [ebp + 0x28]
mov esi, dword [ebp + 8]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], edi
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 4], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov ecx, dword [ebp + 0x20]
mov eax, 6
test ecx, ecx
js 0x405473
mov eax, ecx
mov ecx, edi
or ecx, ebx
je 0x40550c
mov cx, 8
test eax, 0x10000
jne 0x405491
movzx ecx, cx
or ecx, 0x800
mov dword [esp + 0x84], ecx
mov ecx, eax
and ecx, 0xf
mov dword [esp + 0x14], ecx
sete dh
mov ecx, dword [esi + 0x48]
mov dword [esp + 8], ecx
test ecx, ecx
je 0x405543
cmp dword [esi + 0x14], 2
jne 0x405543
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x405543
or dl, cl
je 0x405543
cmp word [ebp + 0x1c], 0
je 0x40553c
cmp dword [ebp + 0x18], 0
je 0x405543
cmp dword [esp + 0x14], 0xa
ja 0x405543
mov byte [esp + 0x1c], dh
mov edx, dword [esp + 8]
mov ecx, dword [edx + 0x34]
mov esi, dword [esi + 0x10]
test ecx, ecx
je 0x405554
cmp esi, 0xffffffff
jne 0x40556e
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x40554a
cmp dword [ebp + 0x14], 0
je 0x40552a
mov ecx, eax
xor ecx, 0xfffffbff
mov edx, eax
or edx, 0x400
test edx, ecx
je 0x40547d
xor ecx, ecx
test eax, 0x10000
jne 0x405491
jmp 0x405488
cmp dword [esp + 0x14], 0xb
jb 0x4054e9
mov dword [esi + 0x1c], 0x18
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
test ebx, ebx
jne 0x405562
xor ecx, ecx
cmp esi, 0xffff
jne 0x40556e
mov dword [edx + 0x34], 1
mov ecx, 1
mov esi, ecx
mov ecx, edi
or ecx, ebx
je 0x40558c
mov ecx, eax
and ecx, 0x400
jne 0x40558c
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x40554a
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x40561f
mov ecx, eax
shr ecx, 0xa
and ecx, 1
test eax, 0x400
mov dword [esp + 0x44], ecx
mov dword [esp + 0x8c], esi
je 0x4055c3
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x88], eax
mov byte [esp + 0x24], 1
jmp 0x40560d
or byte [esp + 0x1c], cl
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push 0
call fcn.00402f80
add esp, 0xc
mov dword [esp + 0x88], eax
xor ebx, ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
mov eax, 0
cmp esi, 4
setb cl
jb 0x4055fe
mov eax, dword [esp + 0x14]
or cl, byte [esp + 0x1c]
mov byte [esp + 0x24], cl
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x14], eax
push dword [ebp + 0xc]
call fcn.00408a40
add esp, 4
cmp eax, 0x10000
jb 0x40562e
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x40554a
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], 0
mov esi, 0xfffffffe
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov edx, dword [eax + 0x24]
or edx, ecx
mov edx, 0
je 0x40565f
lea edx, [esi + ecx]
inc edx
mov eax, dword [eax]
and eax, edx
sub ecx, eax
and ecx, edx
mov edx, ecx
mov dword [esp + 0x40], edx
mov eax, dword [esp + 8]
mov edx, dword [eax + 4]
movzx eax, word [ebp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x98], eax
add edx, eax
setb cl
mov eax, edx
add eax, dword [esp + 0x1c]
mov dword [esp + 0x80], ecx
adc ecx, 0
add eax, 0x4a
adc ecx, 0
cmp esi, eax
sbb dword [esp + 0x10], ecx
jae 0x4056ad
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x40554a
mov esi, dword [esp + 0x8c]
test esi, esi
jne 0x405706
mov esi, dword [esp + 0x1c]
mov eax, esi
shr eax, 0x1f
add edx, dword [ebp + 0x38]
mov ecx, dword [esp + 0x80]
adc ecx, 0
add esi, esi
add edx, dword [ebp + 0x40]
adc ecx, 0
add edx, esi
adc ecx, eax
add edx, dword [esp + 0x40]
adc ecx, 0
mov eax, dword [ebp + 8]
add edx, dword [eax]
adc ecx, dword [eax + 4]
add edx, 0x72
adc ecx, 0xffffffff
xor esi, esi
cmp ecx, 0xffffffff
je 0x405706
mov eax, dword [esp + 8]
mov dword [eax + 0x34], 1
mov esi, 1
xor edx, edx
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x405731
mov eax, dword [ebp + 0xc]
cmp byte [ecx + eax - 1], 0x2f
jne 0x405731
cmp dword [ebp + 0x14], 0
jne 0x405580
mov edx, 0x10
or edi, ebx
jne 0x405580
mov dword [esp + 0x8c], edx
test esi, esi
je 0x405741
mov esi, 0x1c
mov edi, dword [esp + 0x98]
lea eax, [edi + ecx]
mov ecx, dword [esp + 0x20]
add ecx, eax
lea eax, [esi + ecx]
add eax, 0x2e
mov ebx, dword [esp + 8]
mov edx, dword [ebx + 8]
cmp edx, eax
mov esi, dword [esp + 4]
jae 0x4057a0
mov ecx, 1
test edx, edx
je 0x405771
mov ecx, edx
mov edi, ecx
add ecx, ecx
cmp edi, eax
jb 0x405771
push edi
mov ebx, dword [esp + 0xc]
push dword [ebx + 0xc]
push dword [ebx]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x4058f7
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov esi, dword [esp + 4]
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x18]
inc eax
cmp edx, eax
jae 0x4057e7
mov ecx, 1
test edx, edx
je 0x4057b6
mov ecx, edx
mov edi, ecx
add ecx, ecx
cmp edi, eax
jb 0x4057b6
push edi
mov ebx, dword [esp + 0xc]
push dword [ebx + 0x1c]
push dword [ebx + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x4058f7
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], edi
mov esi, dword [esp + 4]
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x24]
jne 0x405811
push 0x4df40
push 1
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x28]
add esp, 0xc
test eax, eax
je 0x405a01
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 8]
mov edx, esi
mov ebx, dword [esp + 0x40]
push ebx
mov edi, esi
mov esi, dword [esp + 0x10]
push esi
call fcn.00405fe0
add esp, 8
test eax, eax
je 0x405903
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
add eax, ebx
adc ecx, 0
add edi, ebx
mov dword [esp + 4], edi
mov dword [esp + 0x28], eax
adc esi, 0
mov dword [esp + 0xc], esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov word [esp + 0x7c], 0
movzx ebx, byte [esp + 0x24]
xor bl, 1
or bl, byte [esp + 0x44]
movzx edx, bl
shl edx, 3
mov dword [esp + 0x44], edx
mov edx, dword [esp + 8]
cmp dword [edx + 0x34], 0
je 0x405918
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov dword [esp + 8], 0
mov edx, 0xfffffffe
cmp edx, edi
mov edx, 0
mov dword [esp + 0x20], esi
sbb edx, esi
jb 0x405a10
xor edx, edx
mov esi, 0xfffffffe
cmp esi, eax
sbb edx, ecx
jb 0x405a10
xor edi, edi
jmp 0x405a6c
mov dword [esi + 0x1c], 0x10
jmp 0x40554a
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x40554a
cmp dword [esp + 0x3c], 0
jne 0x405def
cmp dword [esp + 0xc], 0
jne 0x405def
mov dword [esp + 0x60], 0x4034b50
test bl, bl
mov esi, dword [ebp + 8]
je 0x40593f
mov bl, 0x14
mov byte [esp + 0x64], bl
mov ebx, dword [esp + 0x84]
movzx edx, bx
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], dh
mov edx, dword [esp + 0x44]
mov byte [esp + 0x68], dl
mov dword [esp + 0x69], 0
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov byte [esp + 0x79], 0
mov ebx, dword [esp + 0x1c]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov edx, dword [ebp + 0x38]
mov byte [esp + 0x7c], dl
mov byte [esp + 0x7d], dh
lea edx, [esp + 0x60]
push 0x1e
push edx
push ecx
push eax
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405bed
mov edi, dword [esp + 4]
add edi, 0x1e
mov eax, esi
mov esi, dword [esp + 0xc]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
push edi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405bdd
mov eax, edi
and eax, ebx
mov ecx, eax
shr ecx, 0x1f
add eax, eax
xor edi, ebx
add edi, eax
adc esi, ecx
mov dword [esp + 8], 0
mov dword [esp + 0x20], 0
jmp 0x405b60
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x40554a
xor edx, edx
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x405a26
xor eax, eax
jmp 0x405a2a
lea eax, [esp + 0x28]
mov ecx, 0xfffffffe
cmp ecx, edi
mov ecx, 0
sbb ecx, dword [esp + 0x20]
jb 0x405a43
mov esi, 0
jmp 0x405a47
lea esi, [esp + 0x38]
jae 0x405a4d
lea edx, [esp + 0x30]
lea ecx, [esp + 0xa0]
mov dword [esp + 8], ecx
push eax
push esi
call fcn.00406080
add esp, 8
mov edi, eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0x38]
add edx, edi
mov dword [esp + 0x60], 0x4034b50
test bl, bl
je 0x405a82
mov bl, 0x14
mov byte [esp + 0x64], bl
mov byte [esp + 0x65], 0
movzx ebx, word [esp + 0x84]
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], bh
mov ebx, dword [esp + 0x44]
mov byte [esp + 0x68], bl
mov dword [esp + 0x69], 0
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov byte [esp + 0x79], 0
mov ebx, dword [esp + 0x1c]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov byte [esp + 0x7c], dl
mov byte [esp + 0x7d], dh
lea edx, [esp + 0x60]
push 0x1e
push edx
push ecx
push eax
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405bed
mov dword [esp + 0x20], edi
mov edi, dword [esp + 4]
add edi, 0x1e
mov eax, esi
mov esi, dword [esp + 0xc]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
push edi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405bdd
add edi, ebx
adc esi, 0
cmp dword [esp + 8], 0
je 0x405b58
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x20]
push ebx
push eax
push esi
push edi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405dc0
add edi, ebx
adc esi, 0
jmp 0x405b60
mov dword [esp + 8], 0
mov ebx, dword [ebp + 0x38]
test ebx, ebx
je 0x405b92
push ebx
push dword [ebp + 0x34]
push esi
push edi
mov ebx, esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, dword [ebp + 0x38]
mov eax, dword [ebp + 0x38]
jne 0x405bed
add edi, eax
mov dword [esp + 4], edi
adc ebx, 0
mov dword [esp + 0xc], ebx
jmp 0x405b9a
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
cmp byte [esp + 0x24], 0
je 0x405bf9
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x14]
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405bdd
mov eax, dword [ebp + 0x14]
add dword [esp + 4], eax
adc dword [esp + 0xc], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0
jmp 0x405cbe
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x40554a
cmp dword [ebp + 0x14], 0
je 0x405cbe
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov eax, dword [esp + 0x14]
mov ecx, eax
cmp eax, 0xa
jb 0x405c3a
mov ecx, 0xa
xor eax, eax
mov edx, dword [esp + 0x14]
cmp edx, 4
setl al
shl eax, 0xe
or eax, dword [ecx*4 + 0x43dd28]
test edx, edx
jne 0x405c59
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x4060f0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00404620
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x9c]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.004030d0
add esp, 0x18
cmp eax, 1
jne 0x405dcf
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xc], eax
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov esi, ecx
mov dword [esp + 0x14], eax
or ecx, eax
je 0x405ee8
mov dword [esp + 0x48], 0x8074b50
mov edx, dword [esp + 0x88]
mov byte [esp + 0x4c], dl
mov byte [esp + 0x4d], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x4e], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x4f], cl
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
cmp dword [esp + 8], 0
je 0x405deb
mov byte [esp + 0x50], cl
mov byte [esp + 0x51], ch
mov ebx, ecx
shr ebx, 0x10
mov byte [esp + 0x52], bl
mov ebx, edx
shr ebx, 0x10
shr ecx, 0x18
mov byte [esp + 0x53], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x54], dl
mov byte [esp + 0x55], dh
mov byte [esp + 0x56], bl
mov byte [esp + 0x57], cl
mov edx, esi
mov byte [esp + 0x58], dl
mov byte [esp + 0x59], dh
mov ecx, esi
shr ecx, 0x10
mov byte [esp + 0x5a], cl
mov ecx, esi
shr ecx, 0x18
mov byte [esp + 0x5b], cl
mov dword [esp + 0x40], 0x38
mov dword [esp + 0x94], 0x30
mov ecx, 0x28
mov dword [esp + 0x24], 0x18
mov dword [esp + 0x10], 0x17
mov eax, dword [esp + 0x14]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0x80], 0x16
mov dword [esp + 0x90], 0x15
mov edi, 0x14
jmp 0x405e4b
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x40554a
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x40554a
test edx, edx
je 0x405dfe
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x40554a
mov dword [esp + 0x50], ecx
mov dword [esp + 0x40], 0x18
mov dword [esp + 0x94], 0x10
mov ecx, 8
mov dword [esp + 0x10], 0xf
mov dword [esp + 0x80], 0xe
mov edx, esi
mov byte [esp + 0x1b], dl
mov dword [esp + 0x90], 0xd
mov edi, 0xc
mov dword [esp + 0x24], 0x10
mov edx, esi
mov ebx, dword [esp + 0x14]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + edi + 0x48], al
test cl, 0x20
jne 0x405e66
mov ebx, edx
mov edx, esi
mov ecx, dword [esp + 0x94]
mov eax, dword [esp + 0x14]
shrd edx, eax, cl
mov edi, dword [esp + 0x90]
mov byte [esp + edi + 0x48], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x405e8c
mov ebx, edx
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
shrd esi, eax, cl
mov edx, esi
mov esi, dword [esp + 0x80]
mov byte [esp + esi + 0x48], bl
shr eax, cl
test cl, 0x20
jne 0x405ead
mov eax, edx
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x48], al
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x24]
push esi
push eax
push dword [esp + 0x14]
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x40554a
mov eax, dword [esp + 0x24]
add dword [esp + 4], eax
adc dword [esp + 0xc], 0
cmp dword [esp + 8], 0
je 0x405f47
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x28]
mov eax, 0
sbb eax, dword [esp + 0x2c]
jb 0x405f09
xor eax, eax
jmp 0x405f0d
lea eax, [esp + 0x28]
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x30]
mov ecx, 0
sbb ecx, dword [esp + 0x34]
jb 0x405f28
mov edi, 0
jmp 0x405f2c
lea edi, [esp + 0x38]
jae 0x405f32
lea edx, [esp + 0x30]
lea ecx, [esp + 0xa0]
push eax
push edi
call fcn.00406080
add esp, 8
mov dword [esp + 0x20], eax
movzx ebx, word [esp + 0x84]
movzx esi, word [esp + 0x44]
movzx eax, word [esp + 0x20]
movzx edi, word [esp + 0x1c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x94]
push dword [esp + 0x38]
push dword [esp + 0x38]
push 0
push 0
push ebx
push esi
push dword [esp + 0xac]
push dword [esp + 0x64]
push dword [esp + 0x64]
push dword [esp + 0x64]
push dword [esp + 0x64]
push dword [esp + 0xd0]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x4c]
push edi
call fcn.00406140
add esp, 0x4c
test eax, eax
je 0x40554a
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 4]
mov dword [eax], ecx
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov eax, 1
jmp 0x40554c