Function at 0x4059b0
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 esi, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], esi
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 4], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov edi, 6
test eax, eax
js 0x4059ff
mov edi, eax
mov dword [esp + 0x14], esi
mov eax, esi
mov dword [esp + 0x1c], ecx
or eax, ecx
je 0x405a1b
mov esi, edi
and esi, 0x400
mov ax, 8
jmp 0x405a35
cmp dword [ebp + 0x14], 0
setne al
mov esi, edi
and esi, 0x400
sete cl
and cl, al
movzx eax, cl
shl eax, 3
test edi, 0x10000
mov dword [esp + 0x10], edx
jne 0x405a49
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x84], eax
and edi, 0xf
sete dh
test esi, esi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 8], ecx
test ecx, ecx
je 0x405abc
cmp dword [ebx + 0x14], 2
jne 0x405abc
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x405abc
or dl, cl
je 0x405abc
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x405abc
cmp edi, 0xb
jae 0x405abc
mov ecx, dword [esp + 8]
cmp dword [ecx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x405acf
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x405aed
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405ac5
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esp + 0x1c], 0
jne 0x405ae0
mov bl, 1
cmp ecx, 0xffff
jne 0x405aed
mov ecx, dword [esp + 8]
mov dword [ecx + 0x34], 1
xor ebx, ebx
or dh, al
test esi, esi
je 0x405ba3
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2f
je 0x405bc8
mov byte [esp + 0x24], dh
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x88], eax
push dword [ebp + 0xc]
call fcn.00408fd0
add esp, 4
cmp eax, 0x10000
jae 0x405bc8
mov dword [esp + 0x28], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x80], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov dword [esp + 0xc], 0
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x405b5d
lea edx, [eax - 1]
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x18], edx
mov eax, dword [esp + 8]
mov ecx, dword [eax + 4]
xor edx, edx
mov eax, dword [esp + 0x80]
add eax, dword [esp + 0x28]
setb dl
mov dword [esp + 0x2c], ecx
add eax, ecx
adc edx, 0
add eax, 0x4a
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
sbb dword [esp + 0xc], edx
jae 0x405bd7
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405ac3
mov eax, dword [esp + 0x14]
or eax, dword [esp + 0x1c]
je 0x405bbc
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405ac3
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2f
jne 0x405c7c
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405ac3
test bl, bl
je 0x405c38
mov ecx, dword [esp + 0x28]
shr ecx, 0x1f
mov dword [esp + 0xc], 0
mov ebx, dword [esp + 0x80]
add ebx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ebx, dword [ebp + 0x40]
adc edx, 0
mov eax, dword [esp + 0x28]
add eax, eax
add ebx, eax
adc edx, ecx
add ebx, dword [esp + 0x18]
adc edx, 0
add ebx, dword [esp + 0x2c]
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 0x405c40
mov eax, dword [esp + 8]
mov dword [eax + 0x34], 1
mov dword [esp + 0xc], 0x1c
xor ecx, ecx
mov edx, dword [esp + 0x28]
test edx, edx
je 0x405cd0
mov eax, dword [ebp + 0xc]
cmp byte [eax + edx - 1], 0x2f
mov edx, dword [ebp + 8]
jne 0x405cd3
cmp dword [ebp + 0x14], 0
jne 0x405c70
mov ecx, 0x10
mov eax, dword [esp + 0x14]
or eax, dword [esp + 0x1c]
je 0x405cd3
mov dword [edx + 0x1c], 0x18
jmp 0x405ac3
mov byte [esp + 0x24], dh
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00403730
add esp, 0xc
mov dword [esp + 0x88], eax
mov dword [esp + 0x1c], 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 0x405cbe
mov eax, edi
or byte [esp + 0x24], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x14], ecx
mov edi, eax
jmp 0x405b11
mov edx, dword [ebp + 8]
mov dword [esp + 0x98], ecx
mov ecx, dword [esp + 0x28]
mov eax, ecx
and eax, 0x2e
xor ecx, 0x2e
add ecx, dword [esp + 0x80]
lea eax, [ecx + eax*2]
add eax, dword [esp + 0xc]
add eax, dword [esp + 0x2c]
mov ebx, dword [esp + 8]
cmp dword [ebx + 8], eax
jae 0x405d1b
mov ecx, edx
mov edx, ebx
push 1
push eax
call fcn.00408d00
mov edx, dword [ebp + 8]
add esp, 8
test eax, eax
je 0x405e55
mov eax, dword [ebx + 0x14]
inc eax
cmp dword [ebx + 0x18], eax
jae 0x405d40
lea edx, [ebx + 0x10]
mov ecx, dword [ebp + 8]
push 1
push eax
call fcn.00408d00
mov edx, dword [ebp + 8]
add esp, 8
test eax, eax
je 0x405e55
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x24]
jne 0x405d6b
push 0x4df40
push 1
push dword [edx + 0x34]
mov ebx, edx
call dword [edx + 0x28]
mov edx, ebx
add esp, 0xc
test eax, eax
je 0x405e55
mov dword [esp + 0xc], eax
mov ecx, edx
mov ebx, dword [esp + 4]
mov edx, ebx
push dword [esp + 0x18]
push dword [esp + 0x14]
call fcn.00406550
add esp, 8
test eax, eax
je 0x405e61
test esi, esi
sete cl
add ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
adc edx, 0
mov dword [esp + 4], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edx
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
and cl, byte [esp + 0x24]
mov eax, ecx
xor al, 1
movzx eax, al
shl eax, 3
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 8]
cmp dword [eax + 0x34], 0
je 0x405e76
mov byte [esp + 8], cl
xor eax, eax
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x14]
mov ecx, 0
sbb ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
jb 0x405e40
xor ebx, ebx
mov ecx, dword [esp + 4]
cmp esi, ecx
sbb ebx, edx
mov ebx, ecx
mov ecx, edx
mov dword [esp + 0x18], 0
jae 0x405ee1
mov ecx, edx
xor edx, edx
cmp esi, dword [esp + 4]
mov eax, 0
sbb eax, ecx
jb 0x405ea0
xor eax, eax
jmp 0x405ea4
mov dword [edx + 0x1c], 0x10
jmp 0x405ac3
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405ac3
test edx, edx
je 0x405e89
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405ac3
mov dword [esp + 0x60], 0x4034b50
test cl, cl
jne 0x405ffb
mov al, 0x14
jmp 0x405ffd
lea eax, [esp + 0x38]
cmp esi, dword [esp + 0x14]
mov ecx, 0
sbb ecx, dword [esp + 0x1c]
jb 0x405eba
mov esi, 0
jmp 0x405ebe
lea esi, [esp + 0x30]
jae 0x405ec4
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
mov dword [esp + 0x18], ecx
push eax
push esi
call fcn.004065f0
add esp, 8
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov esi, ebx
mov dword [esp + 0x1c], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x60], 0x4034b50
cmp byte [esp + 8], 0
jne 0x405eff
mov bl, 0x14
jmp 0x405f01
xor ebx, ebx
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 + 0x2c]
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 + 0x28]
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 esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406160
mov eax, dword [esp + 4]
add eax, 0x1e
mov ecx, esi
mov esi, dword [esp + 0x10]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
mov dword [esp + 0x10], eax
push eax
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405fef
mov edx, dword [esp + 4]
add edx, ebx
adc esi, 0
cmp dword [esp + 0x18], 0
mov ecx, esi
je 0x4060c8
lea eax, [esp + 0xa0]
mov esi, dword [esp + 0x1c]
push esi
push eax
push ecx
push edx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov ebx, ecx
mov dword [esp + 0x18], edx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406144
mov edx, dword [esp + 4]
add edx, esi
adc ebx, 0
mov ecx, ebx
jmp 0x4060d0
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
jmp 0x406157
xor eax, eax
mov esi, dword [ebp + 8]
mov byte [esp + 0x64], al
mov ecx, dword [esp + 0x84]
movzx eax, cx
mov byte [esp + 0x66], cl
mov byte [esp + 0x67], ah
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], al
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 + 0x28]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x7c], al
mov byte [esp + 0x7d], ah
lea eax, [esp + 0x60]
push 0x1e
push eax
push edx
push dword [esp + 0x10]
push dword [esi + 0x44]
mov dword [esp + 0x24], edx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406160
mov eax, dword [esp + 4]
add eax, 0x1e
mov ecx, dword [esp + 0x10]
adc ecx, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0x18], ecx
push ecx
mov dword [esp + 0x10], eax
push eax
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406153
mov edx, dword [esp + 4]
add edx, ebx
mov ecx, dword [esp + 0x10]
adc ecx, 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
jmp 0x4060d0
mov dword [esp + 0x18], 0
mov esi, dword [ebp + 0x38]
test esi, esi
je 0x406100
push esi
push dword [ebp + 0x34]
push ecx
push edx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov ebx, ecx
mov dword [esp + 0x18], edx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406144
mov eax, esi
mov edx, dword [esp + 4]
add edx, esi
adc ebx, 0
mov ecx, ebx
mov ebx, dword [ebp + 0x14]
movzx eax, byte [esp + 0x24]
test al, al
je 0x40616c
push ebx
push dword [ebp + 0x10]
push ecx
push edx
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
mov dword [esp + 0x24], ecx
mov edi, edx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406153
add edi, ebx
mov dword [esp + 4], edi
adc dword [esp + 0x10], 0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], 0
jmp 0x40621f
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x405ac3
push dword [esp + 0xc]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405ac3
test ebx, ebx
je 0x406214
mov esi, ebx
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
cmp edi, 4
setb al
shl eax, 0xe
or eax, dword [edi*4 + 0x443a54]
test edi, edi
jne 0x4061b0
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x406660
mov edi, dword [esp + 0x18]
push edi
call fcn.00404d20
add esp, 0x10
mov dword [esp + 0x9c], esi
lea eax, [esp + 0x9c]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push edi
call fcn.004037e0
add esp, 0x18
cmp eax, 1
jne 0x406331
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x10], eax
jmp 0x40621c
mov dword [esp + 0x10], ecx
mov dword [esp + 4], edx
mov esi, dword [ebp + 8]
push dword [esp + 0xc]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov esi, eax
mov dword [esp + 8], ecx
or eax, ecx
je 0x40631c
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x88]
mov byte [esp + 0x4c], cl
mov byte [esp + 0x4d], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x4e], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x4f], al
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x18], 0
je 0x40634d
mov byte [esp + 0x50], bl
mov byte [esp + 0x51], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x52], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x53], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov byte [esp + 0x56], al
mov byte [esp + 0x57], bl
mov ecx, esi
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, esi
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, esi
shr eax, 0x18
mov byte [esp + 0x5b], al
mov dword [esp + 0xc], 0x38
mov dword [esp + 0x90], 0x30
mov ecx, 0x28
mov dword [esp + 0x14], 0x18
mov dword [esp + 0x24], 0x17
mov eax, dword [esp + 8]
mov byte [esp + 0x23], al
mov dword [esp + 0x94], 0x16
mov dword [esp + 0x8c], 0x15
mov edi, 0x14
jmp 0x4063a2
mov dword [esp + 8], 0
mov dword [esp + 0x14], 0
jmp 0x40644d
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x405ac3
test ecx, ecx
jne 0x405e7a
mov dword [esp + 0x50], ebx
mov dword [esp + 0xc], 0x18
mov dword [esp + 0x90], 0x10
mov ecx, 8
mov dword [esp + 0x24], 0xf
mov dword [esp + 0x94], 0xe
mov eax, esi
mov byte [esp + 0x23], al
mov dword [esp + 0x8c], 0xd
mov edi, 0xc
mov dword [esp + 0x14], 0x10
mov ebx, esi
mov eax, dword [esp + 8]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x23]
mov byte [esp + edi + 0x48], dl
test cl, 0x20
jne 0x4063bd
mov eax, ebx
mov ebx, esi
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 8]
shrd ebx, edx, cl
mov edi, dword [esp + 0x8c]
mov byte [esp + edi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x4063e3
mov eax, ebx
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
shrd esi, edx, cl
mov edi, dword [esp + 0x94]
mov byte [esp + edi + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x406402
mov edx, esi
mov eax, dword [esp + 0x24]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x14]
push esi
push eax
push dword [esp + 0x18]
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405ac3
mov eax, dword [esp + 0x14]
add dword [esp + 4], eax
adc dword [esp + 0x10], 0
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x18], 0
je 0x4064bc
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x38]
mov eax, 0
sbb eax, dword [esp + 0x3c]
jb 0x40646e
xor ebx, ebx
jmp 0x406472
lea ebx, [esp + 0x38]
mov eax, 0xfffffffe
cmp eax, dword [esp + 8]
mov eax, 0
sbb eax, dword [esp + 0x14]
jb 0x40648d
mov eax, 0
jmp 0x406491
lea eax, [esp + 0x30]
jae 0x406497
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
push ebx
push eax
call fcn.004065f0
add esp, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x14], eax
movzx eax, word [esp + 0x84]
movzx edi, word [esp + 0x2c]
movzx ebx, word [esp + 0x1c]
movzx esi, word [esp + 0x28]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0xa0]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push eax
push edi
push dword [esp + 0xac]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push dword [esp + 0x44]
push dword [esp + 0x3c]
push dword [esp + 0xb8]
push dword [ebp + 0x18]
push ebx
push dword [esp + 0x5c]
push esi
call fcn.004066b0
add esp, 0x4c
test eax, eax
je 0x405ac3
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 4]
mov dword [eax], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x405ac5