Function at 0x405990
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 esi, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], edi
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 8], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov ecx, dword [ebp + 0x20]
mov eax, 6
test ecx, ecx
js 0x4059df
mov eax, ecx
mov dword [esp], edx
mov ecx, edi
mov dword [esp + 0x18], esi
or ecx, esi
je 0x4059fe
mov ecx, eax
and ecx, 0x400
mov dword [esp + 0x20], ecx
mov cx, 8
jmp 0x405a1c
cmp dword [ebp + 0x14], 0
setne cl
mov edx, eax
and edx, 0x400
mov dword [esp + 0x20], edx
sete dl
and dl, cl
movzx ecx, dl
shl ecx, 3
mov esi, edi
test eax, 0x10000
jne 0x405a2e
movzx ecx, cx
or ecx, 0x800
mov dword [esp + 0x88], ecx
mov ecx, eax
and ecx, 0xf
mov dword [esp + 0x10], ecx
sete dh
cmp dword [esp + 0x20], 0
setne cl
mov edi, dword [ebx + 0x48]
mov dword [esp + 0xc], edi
test edi, edi
je 0x405ab0
cmp dword [ebx + 0x14], 2
jne 0x405ab0
cmp dword [ebp + 0x14], 0
setne dl
cmp dword [ebp + 0x10], 0
sete ch
cmp dword [ebp + 0xc], 0
je 0x405ab0
and ch, dl
jne 0x405ab0
cmp word [ebp + 0x1c], 0
setne dl
cmp dword [ebp + 0x18], 0
sete ch
test ch, dl
jne 0x405ab0
cmp dword [esp + 0x10], 0xb
jae 0x405ab0
mov ch, dh
mov edx, dword [esp + 0xc]
cmp dword [edx + 0x34], 0
mov edx, dword [ebx + 0x10]
je 0x405ac3
xor ebx, ebx
cmp edx, 0xffffffff
mov edi, esi
jne 0x405ae3
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405ab9
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 + 0x18], 0
mov edi, esi
jne 0x405ad6
mov bl, 1
cmp edx, 0xffff
jne 0x405ae3
mov edx, dword [esp + 0xc]
mov dword [edx + 0x34], 1
xor ebx, ebx
mov edx, edi
or edx, dword [esp + 0x18]
je 0x405afe
cmp dword [esp + 0x20], 0
jne 0x405afe
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405ab7
mov edx, dword [ebp + 0xc]
cmp byte [edx], 0x2f
je 0x405b82
mov dl, ch
or dl, cl
mov ecx, eax
xor ecx, 0xfffffbff
or eax, 0x400
test eax, ecx
mov byte [esp + 0x14], dl
je 0x405b2b
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x8c], eax
jmp 0x405b70
mov edi, dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push 0
call fcn.00403690
add esp, 0xc
mov dword [esp + 0x8c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], 0
mov eax, 0
cmp edi, 4
setb cl
jb 0x405b68
mov eax, dword [esp + 0x10]
or byte [esp + 0x14], cl
mov dword [esp + 0x10], eax
push dword [ebp + 0xc]
call fcn.00408d20
add esp, 4
cmp eax, 0x10000
jb 0x405b91
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405ab7
mov dword [esp + 0x24], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x84], eax
mov dword [esp + 4], 0
mov esi, 0xfffffffe
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x405bcd
lea edx, [esi + eax]
inc edx
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x40], edx
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 4]
xor edx, edx
mov dword [esp + 0x44], eax
add eax, dword [esp + 0x84]
setb dl
mov ecx, dword [esp + 0x24]
add eax, ecx
adc edx, 0
add eax, 0x4a
adc edx, 0
cmp esi, eax
sbb dword [esp + 4], edx
jae 0x405c0e
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405ab7
test bl, bl
je 0x405c73
mov ecx, dword [esp + 0x24]
shr ecx, 0x1f
mov dword [esp + 4], 0
mov ebx, dword [esp + 0x84]
add ebx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ebx, dword [ebp + 0x40]
adc edx, 0
mov eax, dword [esp + 0x24]
add eax, eax
add ebx, eax
adc edx, ecx
mov ecx, dword [esp + 0x24]
add ebx, dword [esp + 0x40]
adc edx, 0
add ebx, dword [esp + 0x44]
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 0x405c7b
mov eax, dword [esp + 0xc]
mov dword [eax + 0x34], 1
mov dword [esp + 4], 0x1c
xor edx, edx
test ecx, ecx
je 0x405ca6
mov eax, dword [ebp + 0xc]
cmp byte [eax + ecx - 1], 0x2f
jne 0x405ca6
cmp dword [ebp + 0x14], 0
jne 0x405af2
mov edx, 0x10
mov eax, edi
or eax, dword [esp + 0x18]
jne 0x405af2
mov dword [esp + 0x98], edx
mov eax, dword [esp + 0x84]
add eax, ecx
mov esi, dword [esp + 0x44]
add esi, eax
mov eax, dword [esp + 4]
add eax, esi
add eax, 0x2e
mov ebx, dword [esp + 0xc]
cmp dword [ebx + 8], eax
mov esi, dword [ebp + 8]
jae 0x405ce8
mov ecx, esi
mov edx, ebx
push 1
push eax
call fcn.00408b80
add esp, 8
test eax, eax
je 0x405e37
mov eax, dword [ebx + 0x14]
inc eax
cmp dword [ebx + 0x18], eax
jae 0x405d09
lea edx, [ebx + 0x10]
mov ecx, esi
push 1
push eax
call fcn.00408b80
add esp, 8
test eax, eax
je 0x405e37
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x14]
jne 0x405d30
push 0x4df40
push 1
push dword [esi + 0x34]
call dword [esi + 0x28]
add esp, 0xc
test eax, eax
je 0x405e37
mov dword [esp + 4], eax
mov ecx, esi
mov ebx, dword [esp + 8]
mov edx, ebx
mov esi, dword [esp + 0x40]
push esi
push dword [esp + 4]
call fcn.004064f0
add esp, 8
test eax, eax
je 0x405e43
cmp dword [esp + 0x20], 0
setne al
add ebx, esi
mov esi, dword [esp]
adc esi, 0
mov dword [esp + 8], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], esi
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 dword [esp + 0x7c], 0
mov word [esp + 0x80], 0
movzx ebx, byte [esp + 0x14]
xor bl, 1
or bl, al
movzx eax, bl
shl eax, 3
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
je 0x405e58
mov eax, 0xfffffffe
cmp eax, edi
mov eax, 0
sbb eax, dword [esp + 0x18]
mov dword [esp], esi
jb 0x405e14
xor esi, esi
mov ecx, dword [esp + 8]
mov edx, 0xfffffffe
cmp edx, ecx
mov eax, 0
sbb esi, dword [esp]
mov esi, dword [esp]
mov edx, ecx
mov ecx, esi
mov dword [esp + 0xc], 0
jae 0x405f80
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 8]
mov eax, 0
sbb eax, esi
mov esi, dword [esp + 0x18]
jb 0x405f3e
xor eax, eax
jmp 0x405f42
mov dword [esi + 0x1c], 0x10
jmp 0x405ab7
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405ab7
test esi, esi
mov ecx, dword [esp + 0x88]
je 0x405e72
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405ab7
mov dword [esp + 0x64], 0x4034b50
test bl, bl
je 0x405e80
mov bl, 0x14
mov byte [esp + 0x68], bl
movzx eax, cx
mov byte [esp + 0x6a], cl
mov byte [esp + 0x6b], ah
mov eax, dword [esp + 0x20]
mov byte [esp + 0x6c], al
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x7e], bl
mov byte [esp + 0x7f], bh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x80], al
mov byte [esp + 0x81], ah
lea eax, [esp + 0x64]
push 0x1e
push eax
push esi
mov edi, dword [esp + 0x14]
push edi
mov dword [esp + 0x10], esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406085
add edi, 0x1e
mov eax, dword [esp]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 8], eax
push eax
push edi
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406078
add edi, ebx
adc dword [esp], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x18], 0
jmp 0x406071
lea eax, [esp + 0x30]
mov ecx, 0xfffffffe
cmp ecx, edi
mov ecx, 0
sbb ecx, esi
jb 0x405f59
mov esi, 0
jmp 0x405f5d
lea esi, [esp + 0x28]
jae 0x405f63
lea edx, [esp + 0x38]
lea ecx, [esp + 0xa0]
mov dword [esp + 0xc], ecx
push eax
push esi
call fcn.00406590
add esp, 8
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edi, edx
mov dword [esp + 0x18], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x64], 0x4034b50
test bl, bl
je 0x405f99
mov bl, 0x14
mov byte [esp + 0x68], bl
mov byte [esp + 0x69], 0
movzx ebx, word [esp + 0x88]
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bh
mov ebx, dword [esp + 0x20]
mov byte [esp + 0x6c], bl
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x7e], bl
mov byte [esp + 0x7f], bh
mov byte [esp + 0x80], dl
mov byte [esp + 0x81], dh
lea edx, [esp + 0x64]
push 0x1e
push edx
push ecx
push edi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406085
mov edi, dword [esp + 8]
add edi, 0x1e
mov eax, dword [esp]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 8], eax
push eax
push edi
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406078
add edi, ebx
mov edx, dword [esp]
adc edx, 0
cmp dword [esp + 0xc], 0
mov ecx, edi
mov dword [esp], edx
je 0x406091
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x18]
push ebx
push eax
push edx
push ecx
push dword [esi + 0x44]
mov edi, ecx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406085
mov ecx, ebx
add edi, ebx
adc dword [esp], 0
mov eax, dword [ebp + 0x38]
mov ecx, edi
jmp 0x40609c
push dword [esp + 4]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405ab7
mov dword [esp + 0xc], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 8], ecx
je 0x4060c9
push eax
push dword [ebp + 0x34]
mov ebx, dword [esp + 8]
push ebx
push ecx
push dword [esi + 0x44]
mov edi, eax
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x406085
mov eax, edi
add dword [esp + 8], edi
adc ebx, 0
mov dword [esp], ebx
cmp byte [esp + 0x14], 0
je 0x40610e
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 8]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4062be
mov ecx, esi
add dword [esp + 8], esi
adc dword [esp], 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0
jmp 0x4061c1
cmp dword [ebp + 0x14], 0
je 0x4061c1
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
mov ecx, dword [esp + 0x10]
cmp ecx, 4
setb al
shl eax, 0xe
or eax, dword [ecx*4 + 0x444a54]
test ecx, ecx
jne 0x40615d
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x406600
mov esi, dword [esp + 0x10]
push esi
call fcn.00404cb0
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.004037d0
add esp, 0x18
cmp eax, 1
jne 0x4062df
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp], eax
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov dword [esp + 0x10], ecx
or eax, ecx
je 0x4062ca
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x8c]
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 + 0x28]
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0xc], 0
je 0x4062fb
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 + 0x44], 0x38
mov dword [esp + 0x94], 0x30
mov ecx, 0x28
mov dword [esp + 0x14], 0x18
mov dword [esp + 4], 0x17
mov eax, dword [esp + 0x10]
mov byte [esp + 0x1f], al
mov dword [esp + 0x40], 0x16
mov dword [esp + 0x90], 0x15
mov edi, 0x14
jmp 0x40634d
push dword [esp + 4]
mov esi, dword [ebp + 8]
jmp 0x40607c
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
jmp 0x4063f4
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 0x405ab7
test ecx, ecx
jne 0x405e63
mov dword [esp + 0x50], ebx
mov dword [esp + 0x44], 0x18
mov dword [esp + 0x94], 0x10
mov ecx, 8
mov dword [esp + 4], 0xf
mov dword [esp + 0x40], 0xe
mov eax, esi
mov byte [esp + 0x1f], al
mov dword [esp + 0x90], 0xd
mov edi, 0xc
mov dword [esp + 0x14], 0x10
mov ebx, esi
mov eax, dword [esp + 0x10]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1f]
mov byte [esp + edi + 0x48], dl
test cl, 0x20
jne 0x406368
mov eax, ebx
mov ebx, esi
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x10]
shrd ebx, edx, cl
mov edi, dword [esp + 0x90]
mov byte [esp + edi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x40638e
mov eax, ebx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x10]
shrd esi, edx, cl
mov edi, dword [esp + 0x40]
mov byte [esp + edi + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x4063aa
mov edx, esi
mov eax, dword [esp + 4]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x14]
push esi
push eax
push dword [esp + 8]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405ab7
mov eax, dword [esp + 0x14]
add dword [esp + 8], eax
adc dword [esp], 0
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], eax
cmp dword [esp + 0xc], 0
je 0x406463
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x30]
mov eax, 0
sbb eax, dword [esp + 0x34]
jb 0x406415
xor ebx, ebx
jmp 0x406419
lea ebx, [esp + 0x30]
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x10]
mov eax, 0
sbb eax, dword [esp + 0x14]
jb 0x406434
mov eax, 0
jmp 0x406438
lea eax, [esp + 0x28]
jae 0x40643e
lea edx, [esp + 0x38]
lea ecx, [esp + 0xa0]
push ebx
push eax
call fcn.00406590
add esp, 8
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], eax
movzx eax, word [esp + 0x88]
movzx edi, word [esp + 0x20]
movzx ebx, word [esp + 0x18]
movzx esi, word [esp + 0x24]
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 + 0x40]
push dword [esp + 0x40]
push 0
push eax
push edi
push dword [esp + 0xac]
push dword [esp + 0x50]
push dword [esp + 0x50]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0xb8]
push dword [ebp + 0x18]
push ebx
push dword [esp + 0x4c]
push esi
call fcn.00406650
add esp, 0x48
test eax, eax
je 0x405ab7
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax], ecx
mov ecx, dword [esp]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x405ab9