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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc8
mov esi, dword [ebp + 0x24]
mov edi, dword [ebp + 0x28]
mov edx, dword [ebp + 8]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], esi
mov ebx, dword [edx]
mov eax, dword [edx + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov ecx, dword [ebp + 0x20]
mov eax, 6
test ecx, ecx
js 0x4053af
mov eax, ecx
mov ecx, esi
or ecx, edi
je 0x4053bb
mov cx, 8
jmp 0x4053ca
cmp dword [ebp + 0x14], 0
je 0x4053c8
test eax, 0x400
je 0x4053b5
xor ecx, ecx
test eax, 0x10000
mov dword [esp + 0x14], ebx
jne 0x4053de
movzx ecx, cx
or ecx, 0x800
mov dword [esp + 0x8c], ecx
mov ecx, eax
and ecx, 0xf
mov dword [esp + 0x1c], ecx
sete bl
mov ecx, dword [edx + 0x48]
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x40549c
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x14], 2
jne 0x40549c
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x40549c
or dl, cl
je 0x40549c
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x40549c
cmp dword [esp + 0x1c], 0xb
jae 0x40549c
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 0x34]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x10]
mov dword [esp + 8], ecx
test ecx, ecx
je 0x405465
cmp edx, 0xffffffff
jne 0x40548c
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x4054a6
test edi, edi
jne 0x405479
mov dword [esp + 8], 0
cmp edx, 0xffff
jne 0x40548c
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x34], 1
mov dword [esp + 8], 1
mov ecx, esi
or ecx, edi
je 0x4054b2
mov ecx, eax
and ecx, 0x400
jne 0x4054b2
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x40552c
mov ecx, eax
shr ecx, 0xa
and ecx, 1
test eax, 0x400
mov dword [esp + 0x4c], ecx
je 0x4054db
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
mov bh, 1
jmp 0x40551a
or bl, cl
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push 0
call fcn.00402ee0
add esp, 0xc
mov dword [esp + 0x90], eax
xor edi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0
mov eax, 0
cmp esi, 4
setb bh
jb 0x405514
mov eax, dword [esp + 0x1c]
or bh, bl
mov dword [esp + 0x1c], eax
push dword [ebp + 0xc]
call fcn.00408940
add esp, 4
cmp eax, 0x10000
jb 0x40553b
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x4054a6
mov edx, eax
mov byte [esp + 0x38], bh
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x94], eax
xor ebx, ebx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x3c], edx
call fcn.00405f10
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
xor edx, edx
mov ecx, dword [esp + 0x94]
add ecx, dword [esp + 0x3c]
setb dl
mov dword [esp + 0x88], eax
add ecx, eax
adc edx, 0
mov eax, ecx
mov dword [esp + 0x34], ecx
add eax, 0x4a
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
mov eax, 0
sbb eax, edx
jae 0x4055ac
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x4054a8
cmp dword [esp + 8], 0
jne 0x405619
mov eax, dword [esp + 0x3c]
mov ecx, eax
shr ecx, 0x1f
mov dword [esp + 8], 0
mov ebx, dword [esp + 0x94]
add ebx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ebx, dword [ebp + 0x40]
adc edx, 0
add eax, eax
add ebx, eax
adc edx, ecx
add ebx, dword [esp + 4]
adc edx, 0
add ebx, dword [esp + 0x88]
adc edx, 0
mov eax, dword [ebp + 8]
add ebx, dword [eax]
adc edx, dword [eax + 4]
add ebx, 0x72
adc edx, 0
cmp edx, 0xffffffff
je 0x405619
mov eax, dword [esp + 0x10]
mov dword [eax + 0x34], 1
mov dword [esp + 8], 1
mov dword [esp + 0x88], 0
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x40565b
mov eax, dword [ebp + 0xc]
cmp byte [edx + eax - 1], 0x2f
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 4]
jne 0x40565f
cmp dword [ebp + 0x14], 0
jne 0x40549f
mov dword [esp + 0x88], 0x10
or esi, edi
je 0x40565f
jmp 0x40549f
mov ebx, dword [esp + 4]
mov eax, dword [esp + 8]
test eax, eax
je 0x40566c
mov eax, 0x1c
mov ecx, dword [esp + 0x34]
add eax, ecx
add eax, 0x2e
mov edi, dword [esp + 0x10]
mov edx, dword [edi + 8]
cmp edx, eax
jae 0x4056ba
mov ecx, 1
test edx, edx
je 0x40568b
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x40568b
push esi
push dword [edi + 0xc]
push dword [edi]
mov ebx, edi
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x405815
mov dword [ebx], eax
mov dword [ebx + 8], esi
mov edi, ebx
mov ebx, dword [esp + 4]
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x18]
inc eax
cmp edx, eax
jae 0x4056ff
mov ecx, 1
test edx, edx
je 0x4056d0
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x4056d0
push esi
push dword [edi + 0x1c]
push dword [edi + 0x10]
mov ebx, edi
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x405815
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], esi
mov ebx, dword [esp + 4]
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x38]
jne 0x405729
push 0x4df40
push 1
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x28]
add esp, 0xc
test eax, eax
je 0x40592b
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0x14]
mov edx, esi
push ebx
mov edi, dword [esp + 0x10]
push edi
call fcn.00405f40
add esp, 8
test eax, eax
je 0x405821
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add eax, ebx
adc ecx, 0
add esi, ebx
mov dword [esp + 0x14], esi
mov dword [esp + 8], eax
mov dword [esp + 0x20], eax
adc edi, 0
mov dword [esp + 0x24], ecx
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 dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov word [esp + 0x84], 0
movzx ebx, byte [esp + 0x38]
xor bl, 1
or bl, byte [esp + 0x4c]
movzx edx, bl
shl edx, 3
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
je 0x405836
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov edx, 0xfffffffe
cmp edx, edi
mov edx, 0
sbb edx, eax
jb 0x40593a
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 8]
sbb edx, ecx
jb 0x40593a
mov dword [esp + 0x10], 0
xor eax, eax
jmp 0x40599d
mov dword [edi + 0x1c], 0x10
jmp 0x4054a6
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x4054a6
cmp dword [esp + 0x44], 0
jne 0x405d2a
test edi, edi
jne 0x405d2a
mov dword [esp + 0xc], edi
mov dword [esp + 0x68], 0x4034b50
test bl, bl
je 0x40585b
mov bl, 0x14
mov byte [esp + 0x6c], bl
mov ebx, dword [esp + 0x8c]
movzx edx, bx
mov byte [esp + 0x6e], bl
mov byte [esp + 0x6f], dh
mov edx, dword [esp + 0x4c]
mov byte [esp + 0x70], dl
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov byte [esp + 0x81], 0
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x82], bl
mov byte [esp + 0x83], bh
mov edx, dword [ebp + 0x38]
mov byte [esp + 0x84], dl
mov byte [esp + 0x85], dh
lea edx, [esp + 0x68]
push 0x1e
push edx
push ecx
push dword [esp + 0x14]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405b3a
mov edi, dword [esp + 0x14]
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 0x405b2a
add edi, ebx
adc esi, 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x38]
mov ebx, edi
jmp 0x405aa4
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x4054a6
mov edx, eax
mov eax, 0xfffffffe
cmp eax, dword [esp + 8]
mov eax, 0
sbb eax, ecx
jb 0x405952
xor eax, eax
jmp 0x405956
lea eax, [esp + 0x20]
mov ecx, 0xfffffffe
cmp ecx, edi
mov ecx, 0
sbb ecx, edx
jb 0x40596d
mov esi, 0
jmp 0x405971
lea esi, [esp + 0x40]
mov edx, 0
jae 0x40597c
lea edx, [esp + 0x28]
lea ecx, [esp + 0xa8]
mov dword [esp + 0x10], ecx
push eax
push esi
call fcn.00405fe0
add esp, 8
mov ecx, dword [esp + 0x20]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp + 0x38]
mov dword [esp + 0x34], eax
add edx, eax
mov dword [esp + 0x68], 0x4034b50
test bl, bl
je 0x4059b4
mov bl, 0x14
mov byte [esp + 0x6c], bl
mov byte [esp + 0x6d], 0
movzx ebx, word [esp + 0x8c]
mov byte [esp + 0x6e], bl
mov byte [esp + 0x6f], bh
mov ebx, dword [esp + 0x4c]
mov byte [esp + 0x70], bl
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov byte [esp + 0x81], 0
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x82], bl
mov byte [esp + 0x83], bh
mov byte [esp + 0x84], dl
mov byte [esp + 0x85], dh
lea edx, [esp + 0x68]
push 0x1e
push edx
push ecx
push dword [esp + 0x14]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405b3a
mov edi, dword [esp + 0x14]
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 0x405b2a
add edi, ebx
adc esi, 0
cmp dword [esp + 0x10], 0
mov ebx, edi
je 0x405a99
lea eax, [esp + 0xa8]
mov edi, dword [esp + 0x34]
push edi
push eax
push esi
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x405ad0
add ebx, edi
adc esi, 0
jmp 0x405aa1
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x405adf
push eax
push dword [ebp + 0x34]
push esi
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x38]
add esp, 0x14
cmp eax, ecx
jne 0x405ad0
add ebx, ecx
mov dword [esp + 0x14], ebx
adc esi, 0
mov dword [esp + 0xc], esi
jmp 0x405ae7
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x4054a6
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], ebx
cmp byte [esp + 0x38], 0
je 0x405b46
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x14]
push dword [esp + 0x20]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405b2a
mov eax, dword [ebp + 0x14]
add dword [esp + 0x14], eax
adc dword [esp + 0xc], 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0
jmp 0x405c0b
push dword [esp + 4]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x4054a6
cmp dword [ebp + 0x14], 0
je 0x405c0b
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov eax, dword [esp + 0x1c]
mov ecx, eax
cmp eax, 0xa
jb 0x405b87
mov ecx, 0xa
xor eax, eax
mov edx, dword [esp + 0x1c]
cmp edx, 4
setl al
shl eax, 0xe
or eax, dword [ecx*4 + 0x438d28]
test edx, edx
jne 0x405ba6
or eax, 0x80000
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x406050
mov esi, dword [esp + 0x10]
push esi
call fcn.00404510
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xa4], eax
lea eax, [esp + 0xa4]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.00403060
add esp, 0x18
cmp eax, 1
jne 0x405d0a
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov esi, ecx
mov dword [esp + 0x1c], eax
or ecx, eax
je 0x405e23
mov dword [esp + 0x50], 0x8074b50
mov edx, dword [esp + 0x90]
mov byte [esp + 0x54], dl
mov byte [esp + 0x55], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x56], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x57], cl
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
cmp dword [esp + 0x10], 0
je 0x405d26
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov ebx, ecx
shr ebx, 0x10
mov byte [esp + 0x5a], bl
mov ebx, edx
shr ebx, 0x10
shr ecx, 0x18
mov byte [esp + 0x5b], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x5c], dl
mov byte [esp + 0x5d], dh
mov byte [esp + 0x5e], bl
mov byte [esp + 0x5f], cl
mov edx, esi
mov byte [esp + 0x60], dl
mov byte [esp + 0x61], dh
mov ecx, esi
shr ecx, 0x10
mov byte [esp + 0x62], cl
mov ecx, esi
shr ecx, 0x18
mov byte [esp + 0x63], cl
mov dword [esp + 0x38], 0x38
mov dword [esp + 0x9c], 0x30
mov ecx, 0x28
mov dword [esp + 8], 0x18
mov dword [esp + 4], 0x17
mov eax, dword [esp + 0x1c]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0xa0], 0x16
mov dword [esp + 0x98], 0x15
mov edi, 0x14
jmp 0x405d86
push dword [esp + 4]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x4054a6
test edx, edx
je 0x405d39
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x4054a6
mov dword [esp + 0x58], ecx
mov dword [esp + 0x38], 0x18
mov dword [esp + 0x9c], 0x10
mov ecx, 8
mov dword [esp + 4], 0xf
mov dword [esp + 0xa0], 0xe
mov edx, esi
mov byte [esp + 0x1b], dl
mov dword [esp + 0x98], 0xd
mov edi, 0xc
mov dword [esp + 8], 0x10
mov edx, esi
mov ebx, dword [esp + 0x1c]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + edi + 0x50], al
test cl, 0x20
jne 0x405da1
mov ebx, edx
mov edx, esi
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x1c]
shrd edx, eax, cl
mov edi, dword [esp + 0x98]
mov byte [esp + edi + 0x50], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x405dc7
mov ebx, edx
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
shrd esi, eax, cl
mov edx, esi
mov esi, dword [esp + 0xa0]
mov byte [esp + esi + 0x50], bl
shr eax, cl
test cl, 0x20
jne 0x405de8
mov eax, edx
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x50], al
lea eax, [esp + 0x50]
mov esi, dword [esp + 8]
push esi
push eax
push dword [esp + 0x14]
push dword [esp + 0x20]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4054a6
mov eax, dword [esp + 8]
add dword [esp + 0x14], eax
adc dword [esp + 0xc], 0
cmp dword [esp + 0x10], 0
je 0x405e82
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x20]
mov eax, 0
sbb eax, dword [esp + 0x24]
jb 0x405e44
xor eax, eax
jmp 0x405e48
lea eax, [esp + 0x20]
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x28]
mov ecx, 0
sbb ecx, dword [esp + 0x2c]
jb 0x405e63
mov edi, 0
jmp 0x405e67
lea edi, [esp + 0x40]
jae 0x405e6d
lea edx, [esp + 0x28]
lea ecx, [esp + 0xa8]
push eax
push edi
call fcn.00405fe0
add esp, 8
mov dword [esp + 0x34], eax
movzx ebx, word [esp + 0x8c]
movzx esi, word [esp + 0x4c]
movzx eax, word [esp + 0x34]
movzx edi, word [esp + 0x3c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x90]
push dword [esp + 0x30]
push dword [esp + 0x30]
push 0
push ebx
push esi
push dword [esp + 0xb0]
push dword [esp + 0x68]
push dword [esp + 0x68]
push dword [esp + 0x58]
push dword [esp + 0x58]
push dword [esp + 0xc8]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x50]
push edi
call fcn.004060a0
add esp, 0x48
test eax, eax
je 0x4054a6
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x4054a8