Function at 0x4057a0
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 edi, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edi
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [esp + 0x38], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov esi, 6
test eax, eax
js 0x4057ef
mov esi, eax
mov dword [esp + 0xc], edi
mov eax, edi
mov dword [esp + 0x18], ecx
or eax, ecx
je 0x40580b
mov edi, esi
and edi, 0x400
mov ax, 8
jmp 0x405825
cmp dword [ebp + 0x14], 0
setne al
mov edi, esi
and edi, 0x400
sete cl
and cl, al
movzx eax, cl
shl eax, 3
test esi, 0x10000
mov dword [esp + 8], edx
jne 0x405839
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x8c], eax
and esi, 0xf
sete ah
test edi, edi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 4], ecx
test ecx, ecx
je 0x405ad0
cmp dword [ebx + 0x14], 2
jne 0x405ad0
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x405ad0
or dl, cl
je 0x405ad0
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x405ad0
cmp esi, 0xb
jae 0x405ad0
mov edx, dword [esp + 4]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x4058c7
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x4058e1
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405ad9
cmp dword [esp + 0x18], 0
jne 0x4058d8
mov bl, 1
cmp ecx, 0xffff
jne 0x4058e1
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 0xc]
or ecx, dword [esp + 0x18]
je 0x4058fe
test edi, edi
jne 0x4058fe
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405ad7
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x405982
test edi, edi
je 0x40591b
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
mov byte [esp + 0x24], 1
jmp 0x405970
or ah, al
mov byte [esp + 0xc], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00403770
add esp, 0xc
mov dword [esp + 0x90], eax
mov dword [esp + 0x18], 0
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
mov eax, 0
cmp ecx, 4
setb cl
jb 0x40595f
mov eax, esi
or cl, byte [esp + 0xc]
mov byte [esp + 0x24], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0xc], ecx
mov esi, eax
push dword [ebp + 0xc]
call fcn.00408d00
add esp, 4
cmp eax, 0x10000
jb 0x405991
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405ad7
mov dword [esp + 0x20], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x4c], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov dword [esp + 0x10], 0
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x4059c4
lea edx, [eax - 1]
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 4]
mov ecx, dword [eax + 4]
xor edx, edx
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
add eax, ecx
setb dl
add eax, 0x4a
adc edx, 0
mov ecx, eax
and ecx, dword [esp + 0x4c]
add ecx, ecx
xor eax, dword [esp + 0x4c]
add eax, ecx
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
sbb dword [esp + 0x10], edx
jae 0x405a11
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405ad7
test bl, bl
je 0x405a7d
mov eax, dword [esp + 0x20]
shr eax, 0x1f
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x4c]
add ebx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ebx, dword [ebp + 0x40]
adc edx, 0
mov ecx, dword [esp + 0x20]
add ecx, ecx
add ebx, ecx
adc edx, eax
add ebx, dword [esp + 0x2c]
adc edx, 0
add ebx, dword [esp + 0x14]
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
mov edx, dword [esp + 0x20]
je 0x405a89
mov eax, dword [esp + 4]
mov dword [eax + 0x34], 1
mov dword [esp + 0x10], 0x1c
jmp 0x405a89
mov dword [esp + 0x10], 0x1c
mov edx, dword [esp + 0x20]
mov dword [esp + 0xa0], 0
test edx, edx
je 0x405ae3
mov eax, edx
xor eax, 1
mov ecx, edx
and ecx, 0xfffe
add ecx, ecx
sub ecx, eax
mov eax, dword [ebp + 0xc]
cmp byte [eax + ecx], 0x2f
mov ebx, dword [ebp + 8]
jne 0x405ae6
cmp dword [ebp + 0x14], 0
jne 0x405ad0
mov dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0xc]
or eax, dword [esp + 0x18]
je 0x405ae6
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x4c]
add eax, edx
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x10]
add eax, ecx
add eax, 0x2e
mov ecx, dword [esp + 4]
cmp dword [ecx + 8], eax
jae 0x405b1d
push 1
push eax
push ecx
push ebx
call fcn.00408a70
mov ecx, dword [esp + 0x14]
add esp, 0x10
test eax, eax
je 0x405c5d
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x405b3e
add ecx, 0x10
push 1
push eax
push ecx
push ebx
call fcn.00408a70
add esp, 0x10
test eax, eax
je 0x405c5d
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x24]
jne 0x405b65
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x405c5d
mov dword [esp + 0x10], eax
mov ecx, ebx
mov edx, dword [esp + 8]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.00406370
add esp, 8
test eax, eax
je 0x405c69
test edi, edi
setne byte [esp + 0x14]
mov ecx, dword [esp + 8]
mov edi, ecx
mov ebx, dword [esp + 0x2c]
add edi, ebx
mov edx, dword [esp + 0x28]
adc edx, 0
mov eax, ecx
and eax, ebx
xor ecx, ebx
mov ebx, eax
shr ebx, 0x1f
add eax, eax
add ecx, eax
mov dword [esp + 8], ecx
mov eax, edx
mov ecx, edi
adc ebx, dword [esp + 0x28]
mov edi, ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
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 dword [esp + 0x84], 0
mov word [esp + 0x88], 0
movzx ebx, byte [esp + 0x24]
xor bl, 1
or bl, byte [esp + 0x14]
movzx edx, bl
shl edx, 3
mov dword [esp + 0x28], edx
mov edx, dword [esp + 4]
cmp dword [edx + 0x34], 0
je 0x405c7b
mov dword [esp + 4], edi
mov dword [esp + 0x14], 0
mov edi, 0xfffffffe
cmp edi, dword [esp + 0xc]
mov edx, 0
sbb edx, dword [esp + 0x18]
jb 0x405c8e
xor edx, edx
cmp edi, ecx
sbb edx, eax
jb 0x405c8e
xor edi, edi
jmp 0x405dd9
mov dword [ebx + 0x1c], 0x10
jmp 0x405ad7
push dword [esp + 0x10]
push dword [ebx + 0x34]
call dword [ebx + 0x2c]
add esp, 8
jmp 0x405ad7
test edi, edi
je 0x405ca8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405ad7
xor edx, edx
cmp edi, ecx
mov ecx, eax
mov eax, 0
sbb eax, ecx
jb 0x405d8d
xor eax, eax
jmp 0x405d91
mov dword [esp + 0x6c], 0x4034b50
test bl, bl
je 0x405cb6
mov bl, 0x14
mov byte [esp + 0x70], bl
mov ebx, dword [esp + 0x8c]
movzx edx, bx
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], dh
mov edx, dword [esp + 0x28]
mov byte [esp + 0x74], dl
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
mov edx, dword [esp + 0x20]
mov byte [esp + 0x86], dl
mov byte [esp + 0x87], dh
mov edx, dword [ebp + 0x38]
mov byte [esp + 0x88], dl
mov byte [esp + 0x89], dh
lea edx, [esp + 0x6c]
push 0x1e
push edx
push eax
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405f70
mov ecx, dword [esp + 8]
add ecx, 0x1e
adc edi, 0
mov eax, ebx
mov ebx, dword [esp + 0x20]
push ebx
push dword [ebp + 0xc]
push edi
mov dword [esp + 0x14], ecx
push ecx
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405f7c
mov ecx, dword [esp + 8]
add ecx, ebx
adc edi, 0
mov dword [esp + 4], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
jmp 0x405efb
lea eax, [esp + 0x38]
mov edi, dword [esp + 0x18]
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0xc]
mov ecx, 0
sbb ecx, edi
jb 0x405dae
mov ecx, 0
jmp 0x405db2
lea ecx, [esp + 0x30]
jae 0x405db8
lea edx, [esp + 0x40]
lea edi, [esp + 0xa8]
push eax
push ecx
push edx
mov dword [esp + 0x20], edi
push edi
call fcn.00406420
add esp, 0x10
mov edi, eax
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov edx, dword [ebp + 0x38]
add edx, edi
mov dword [esp + 0x6c], 0x4034b50
test bl, bl
je 0x405dec
mov bl, 0x14
mov byte [esp + 0x70], bl
mov byte [esp + 0x71], 0
movzx ebx, word [esp + 0x8c]
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], bh
mov ebx, dword [esp + 0x28]
mov byte [esp + 0x74], bl
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
mov ebx, dword [esp + 0x20]
mov byte [esp + 0x86], bl
mov byte [esp + 0x87], bh
mov byte [esp + 0x88], dl
mov byte [esp + 0x89], dh
lea edx, [esp + 0x6c]
push 0x1e
push edx
push eax
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405f70
mov dword [esp + 0x18], edi
mov edi, dword [esp + 8]
add edi, 0x1e
mov eax, dword [esp + 4]
adc eax, 0
mov ecx, ebx
mov ebx, dword [esp + 0x20]
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
push edi
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405f7c
add edi, ebx
mov edx, dword [esp + 4]
adc edx, 0
cmp dword [esp + 0x14], 0
mov ecx, edi
mov dword [esp + 4], edx
je 0x405ef3
lea eax, [esp + 0xa8]
mov edi, dword [esp + 0x18]
push edi
push eax
push edx
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
mov dword [esp + 0x1c], ecx
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x405f70
mov ecx, dword [esp + 8]
add ecx, edi
adc dword [esp + 4], 0
jmp 0x405efb
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 8], ecx
je 0x405f2e
push eax
push dword [ebp + 0x34]
mov edi, dword [esp + 0xc]
push edi
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
mov ecx, dword [ebp + 0x38]
add esp, 0x14
cmp eax, ecx
jne 0x405f70
add dword [esp + 8], ecx
adc edi, 0
mov dword [esp + 4], edi
cmp byte [esp + 0x24], 0
je 0x405f98
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0xc]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405f7c
mov ecx, esi
add dword [esp + 8], esi
adc dword [esp + 4], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
jmp 0x406049
mov dword [ebx + 0x1c], 0x13
jmp 0x405ad7
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 0x405ad7
cmp dword [ebp + 0x14], 0
je 0x406049
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
xor eax, eax
cmp esi, 4
setb al
shl eax, 0xe
or eax, dword [esi*4 + 0x21f84c]
test esi, esi
jne 0x405fe4
or eax, 0x80000
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x1e58a0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00404c50
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.00403820
add esp, 0x18
cmp eax, 1
jne 0x406158
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edi, eax
mov dword [esp + 0xc], ecx
or eax, ecx
je 0x406149
mov dword [esp + 0x50], 0x8074b50
mov ecx, dword [esp + 0x90]
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x56], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x57], al
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x14], 0
je 0x406174
mov byte [esp + 0x58], bl
mov byte [esp + 0x59], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x5b], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x5c], cl
mov byte [esp + 0x5d], ch
mov byte [esp + 0x5e], al
mov byte [esp + 0x5f], bl
mov ecx, edi
mov byte [esp + 0x60], cl
mov byte [esp + 0x61], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x62], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x63], al
mov dword [esp + 0x2c], 0x38
mov dword [esp + 0x98], 0x30
mov ecx, 0x28
mov dword [esp + 0x24], 0x18
mov dword [esp + 0x10], 0x17
mov eax, dword [esp + 0xc]
mov byte [esp + 0x1f], al
mov dword [esp + 0x9c], 0x16
mov dword [esp + 0x94], 0x15
mov esi, 0x14
jmp 0x4061c9
mov dword [esp + 0xc], 0
xor ecx, ecx
jmp 0x406272
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 0x405ad7
test ecx, ecx
jne 0x405c7f
mov dword [esp + 0x58], ebx
mov dword [esp + 0x2c], 0x18
mov dword [esp + 0x98], 0x10
mov ecx, 8
mov dword [esp + 0x10], 0xf
mov dword [esp + 0x9c], 0xe
mov eax, edi
mov byte [esp + 0x1f], al
mov dword [esp + 0x94], 0xd
mov esi, 0xc
mov dword [esp + 0x24], 0x10
mov ebx, edi
mov eax, dword [esp + 0xc]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1f]
mov byte [esp + esi + 0x50], dl
test cl, 0x20
jne 0x4061e4
mov eax, ebx
mov ebx, edi
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0xc]
shrd ebx, edx, cl
mov esi, dword [esp + 0x94]
mov byte [esp + esi + 0x50], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x40620a
mov eax, ebx
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0xc]
shrd edi, edx, cl
mov esi, edi
mov edi, dword [esp + 0x9c]
mov byte [esp + edi + 0x50], al
shr edx, cl
test cl, 0x20
jne 0x40622b
mov edx, esi
mov eax, dword [esp + 0x10]
mov byte [esp + eax + 0x50], dl
lea eax, [esp + 0x50]
mov esi, dword [esp + 0x24]
push esi
push eax
push dword [esp + 0xc]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405ad7
mov eax, dword [esp + 0x24]
add dword [esp + 8], eax
adc dword [esp + 4], 0
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x44]
mov edi, dword [ebp + 0x3c]
cmp dword [esp + 0x14], 0
je 0x4062e0
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x38]
mov eax, 0
sbb eax, dword [esp + 0x3c]
jb 0x406296
xor ebx, ebx
jmp 0x40629a
lea ebx, [esp + 0x38]
mov eax, 0xfffffffe
cmp eax, dword [esp + 0xc]
mov eax, 0
sbb eax, ecx
jb 0x4062b3
mov eax, 0
jmp 0x4062b7
lea eax, [esp + 0x30]
jae 0x4062bd
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa8]
push ebx
push eax
push edx
push ecx
call fcn.00406420
add esp, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x44]
movzx esi, word [esp + 0x8c]
movzx eax, word [esp + 0x28]
movzx edx, word [esp + 0x18]
movzx ebx, word [esp + 0x20]
push dword [ebp + 0x40]
push edi
push dword [esp + 0xa8]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push esi
push eax
push dword [esp + 0xb4]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push dword [esp + 0x40]
push dword [esp + 0x84]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x58]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00406510
add esp, 0x54
test eax, eax
je 0x405ad7
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax], ecx
mov ecx, dword [esp + 4]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x405ad9