Function at 0x405d10
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 edi, dword [ebp + 8]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], esi
mov ebx, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x14], 6
test eax, eax
js 0x405d60
mov dword [esp + 0x14], eax
mov eax, esi
mov dword [esp + 0x34], ecx
or eax, ecx
je 0x405d76
mov ecx, dword [esp + 0x14]
and ecx, 0x400
jmp 0x405d8b
mov eax, dword [esp + 0x14]
and eax, 0x400
xor ecx, ecx
cmp dword [ebp + 0x14], 0
je 0x405d91
test eax, eax
jne 0x405d91
mov eax, ecx
mov cx, 8
test dword [esp + 0x14], 0x10000
mov dword [esp + 4], edx
mov dword [esp + 0xc], ebx
jne 0x405dac
movzx ecx, cx
or ecx, 0x800
mov dword [esp + 0x90], ecx
mov ebx, dword [esp + 0x14]
and ebx, 0xf
sete cl
test eax, eax
setne byte [esp + 0x10]
mov edx, dword [edi + 0x48]
mov dword [esp + 8], edx
test edx, edx
je 0x405e2f
cmp dword [edi + 0x14], 2
jne 0x405e2f
cmp dword [ebp + 0x14], 0
sete ch
cmp dword [ebp + 0x10], 0
setne dh
cmp dword [ebp + 0xc], 0
je 0x405e2f
or dh, ch
je 0x405e2f
cmp word [ebp + 0x1c], 0
setne ch
cmp dword [ebp + 0x18], 0
sete dh
test dh, ch
jne 0x405e2f
cmp ebx, 0xb
jae 0x405e2f
mov edx, dword [esp + 8]
mov edx, dword [edx + 0x34]
mov dword [esp], edx
mov edx, dword [edi + 0x10]
mov dword [esp + 0x30], edx
cmp dword [esp], 0
je 0x405e42
cmp dword [esp + 0x30], 0xffffffff
mov edx, dword [esp]
jne 0x405e67
mov dword [edi + 0x1c], 2
jmp 0x405e36
mov dword [edi + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp + 0x30]
cmp dword [esp + 0x34], 0
jne 0x405e57
xor edx, edx
cmp edi, 0xffff
jne 0x405e67
mov edx, dword [esp + 8]
mov dword [edx + 0x34], 1
mov edx, 1
mov edi, esi
or edi, dword [esp + 0x34]
je 0x405e7f
test eax, eax
jne 0x405e7f
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405e36
mov edi, dword [ebp + 0xc]
cmp byte [edi], 0x2f
mov edi, dword [ebp + 8]
jne 0x405e93
mov dword [edi + 0x1c], 0x19
jmp 0x405e36
or cl, byte [esp + 0x10]
movzx ecx, cl
mov dword [esp + 0x10], ecx
test eax, eax
mov dword [esp], edx
je 0x405eb0
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x30], eax
mov edi, ebx
jmp 0x405ef4
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push 0
call fcn.00403af0
add esp, 0xc
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0
mov edi, 0
cmp esi, 4
jb 0x405edd
mov edi, ebx
mov eax, 1
jb 0x405ee8
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], 0
mov dword [esp + 0x10], eax
push dword [ebp + 0xc]
call fcn.00409210
add esp, 4
cmp eax, 0x10000
jb 0x405f15
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405e36
mov dword [esp + 0x44], edi
xor ebx, ebx
mov ecx, dword [ebp + 8]
mov edi, eax
call fcn.00406900
mov dword [esp + 0x48], eax
mov eax, dword [esp + 8]
mov edx, dword [eax + 4]
movzx ecx, word [ebp + 0x1c]
xor eax, eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x98], ecx
add edi, ecx
setb al
mov ecx, edi
mov dword [esp + 0x8c], edx
add ecx, edx
mov dword [esp + 0x88], eax
adc eax, 0
mov dword [esp + 0x1c], ecx
add ecx, 0x4a
adc eax, 0
mov edx, 0xfffffffe
cmp edx, ecx
mov ecx, 0
sbb ecx, eax
jae 0x405f84
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405e38
cmp dword [esp], 0
mov ebx, dword [esp + 8]
jne 0x405ffc
xor ebx, ebx
mov eax, dword [esp + 0x4c]
add eax, dword [esp + 0x48]
setb bl
mov ecx, dword [ebp + 8]
add eax, dword [ecx]
adc ebx, dword [ecx + 4]
add eax, 0x1e
adc ebx, 0
lea ecx, [eax + eax]
and ecx, 0x5c
xor eax, 0x2e
add edi, dword [ebp + 0x38]
mov edx, dword [esp + 0x88]
adc edx, 0
add edi, dword [ebp + 0x40]
adc edx, 0
add edi, dword [esp + 0x8c]
adc edx, 0
add edi, eax
adc edx, ebx
mov ebx, dword [esp + 8]
add edi, ecx
adc edx, 0
add edi, 0x26
adc edx, 0xffffffff
mov dword [esp], 0
cmp edx, 0xffffffff
je 0x405ffc
mov dword [ebx + 0x34], 1
mov dword [esp], 1
xor edx, edx
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x406029
mov eax, dword [ebp + 0xc]
cmp byte [ecx + eax - 1], 0x2f
jne 0x406029
cmp dword [ebp + 0x14], 0
jne 0x405e73
mov edx, 0x10
or esi, dword [esp + 0x34]
jne 0x405e73
mov dword [esp + 0x34], edx
mov eax, dword [esp]
test eax, eax
je 0x406039
mov eax, 0x1c
mov ecx, dword [esp + 0x1c]
add eax, ecx
add eax, 0x2e
mov edx, dword [ebx + 8]
cmp edx, eax
mov ecx, dword [ebp + 0x14]
jae 0x406087
mov ecx, 1
test edx, edx
je 0x406057
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x406057
push esi
mov edi, dword [esp + 0xc]
push dword [edi + 0xc]
push dword [edi]
mov ebx, dword [ebp + 8]
push dword [ebx + 0x34]
call dword [ebx + 0x30]
add esp, 0x10
test eax, eax
je 0x4061ab
mov dword [edi], eax
mov dword [edi + 8], esi
mov ecx, dword [ebp + 0x14]
mov ebx, edi
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x18]
inc eax
cmp edx, eax
jae 0x4060cd
mov ecx, 1
test edx, edx
je 0x40609d
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x40609d
push esi
mov edi, dword [esp + 0xc]
push dword [edi + 0x1c]
push dword [edi + 0x10]
mov ebx, dword [ebp + 8]
push dword [ebx + 0x34]
call dword [ebx + 0x30]
add esp, 0x10
test eax, eax
je 0x4061ab
mov dword [edi + 0x10], eax
mov dword [edi + 0x18], esi
mov ecx, dword [ebp + 0x14]
xor eax, eax
test ecx, ecx
je 0x4060f5
cmp dword [esp + 0x10], 0
jne 0x4060f5
push 0x4df40
push 1
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x28]
add esp, 0xc
test eax, eax
je 0x4061cb
mov dword [esp], eax
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0xc]
mov edx, esi
mov edi, dword [esp + 0x48]
push edi
mov ebx, dword [esp + 8]
push ebx
call fcn.00406930
add esp, 8
test eax, eax
je 0x4061b7
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add eax, edi
adc ecx, 0
add esi, edi
mov dword [esp + 0xc], esi
adc ebx, 0
mov dword [esp + 4], ebx
mov dword [esp + 0x20], eax
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
cmp dword [esp + 0x10], 0
je 0x40619f
mov esi, dword [esp + 0x14]
mov edx, esi
xor edx, 0xfffffbff
or esi, 0x400
test esi, edx
je 0x4061da
mov dx, 8
mov dword [esp + 0x14], edx
mov bl, 0x14
jmp 0x4061e4
mov dword [ebx + 0x1c], 0x10
jmp 0x405e36
push dword [esp]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405e36
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x405e36
xor ebx, ebx
mov dword [esp + 0x14], 0
mov edx, dword [esp + 8]
cmp dword [edx + 0x34], 0
mov edx, 0xfffffffe
je 0x406235
mov dword [esp + 0x1c], ebx
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 8], 0
cmp edx, edi
mov edx, 0
sbb edx, ebx
jb 0x406321
xor edx, edx
mov esi, 0xfffffffe
cmp esi, eax
sbb edx, ecx
jb 0x406321
xor esi, esi
mov edi, dword [ebp + 8]
mov ebx, dword [esp + 0x1c]
jmp 0x406382
cmp dword [esp + 0x3c], 0
jne 0x406701
cmp dword [esp + 4], 0
jne 0x406701
mov dword [esp + 0x68], 0x4034b50
mov byte [esp + 0x6c], bl
mov ebx, dword [esp + 0x90]
movzx edx, bx
mov byte [esp + 0x6e], bl
mov byte [esp + 0x6f], dh
mov edx, dword [esp + 0x14]
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 + 0x4c]
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 eax
mov edi, dword [ebp + 8]
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406532
mov esi, dword [esp + 0xc]
add esi, 0x1e
mov eax, dword [esp + 4]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
push esi
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406526
add esi, ebx
mov edi, dword [esp + 4]
adc edi, 0
mov dword [esp + 8], 0
mov dword [esp + 0x1c], 0
jmp 0x406484
xor edx, edx
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x406337
xor eax, eax
jmp 0x40633b
lea eax, [esp + 0x20]
mov ecx, 0xfffffffe
cmp ecx, edi
mov ecx, 0
sbb ecx, ebx
mov ebx, dword [esp + 0x1c]
jb 0x406356
mov esi, 0
jmp 0x40635a
lea esi, [esp + 0x38]
mov edi, dword [ebp + 8]
jae 0x406363
lea edx, [esp + 0x28]
lea ecx, [esp + 0xa0]
mov dword [esp + 8], ecx
push eax
push esi
call fcn.004069d0
add esp, 8
mov esi, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x68], 0x4034b50
mov byte [esp + 0x6c], bl
mov byte [esp + 0x6d], 0
movzx edx, word [esp + 0x90]
mov byte [esp + 0x6e], dl
mov byte [esp + 0x6f], dh
mov edx, dword [ebp + 0x38]
add edx, esi
mov ebx, dword [esp + 0x14]
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 + 0x4c]
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 eax
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406532
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0xc]
lea eax, [esi + esi]
and eax, 0x3c
xor esi, 0x1e
add esi, eax
mov eax, edi
mov edi, dword [esp + 4]
adc edi, 0
push ebx
push dword [ebp + 0xc]
push edi
push esi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x4064fc
add esi, ebx
adc edi, 0
cmp dword [esp + 8], 0
je 0x40647c
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x1c]
push ebx
push eax
push edi
push esi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406517
add esi, ebx
adc edi, 0
jmp 0x406484
mov dword [esp + 8], 0
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x4064b1
push eax
push dword [ebp + 0x34]
push edi
push esi
mov ebx, esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
mov ecx, dword [ebp + 0x38]
add esp, 0x14
cmp eax, ecx
jne 0x40650b
add ebx, ecx
mov dword [esp + 0xc], ebx
adc edi, 0
jmp 0x4064b5
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
cmp dword [esp + 0x10], 0
je 0x40653e
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0xc]
push dword [esp + 0x18]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4064fc
mov eax, dword [ebp + 0x14]
add dword [esp + 0xc], eax
adc dword [esp + 4], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0
jmp 0x406603
push dword [esp]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405e36
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x405e36
push dword [esp]
push dword [edi + 0x34]
call dword [edi + 0x2c]
add esp, 8
mov dword [edi + 0x1c], 0x13
jmp 0x405e36
cmp dword [ebp + 0x14], 0
je 0x406603
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xc]
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
mov eax, dword [esp + 0x44]
mov ecx, eax
cmp eax, 0xa
jl 0x40657f
mov ecx, 0xa
xor eax, eax
mov edx, dword [esp + 0x44]
cmp edx, 4
setl al
shl eax, 0xe
or eax, dword [ecx*4 + 0x43ea58]
test edx, edx
jne 0x40659e
or eax, 0x80000
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x406a40
mov esi, dword [esp + 0xc]
push esi
call fcn.00404fc0
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.00403c10
add esp, 0x18
cmp eax, 1
jne 0x406710
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
push dword [esp]
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 + 0x10], eax
or ecx, eax
je 0x406812
mov dword [esp + 0x50], 0x8074b50
mov edx, dword [esp + 0x30]
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 + 0x38]
mov edx, dword [esp + 0x3c]
cmp dword [esp + 8], 0
je 0x4066fd
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 + 0x8c], 0x38
mov dword [esp + 0x44], 0x30
mov ecx, 0x28
mov dword [esp], 0x18
mov dword [esp + 0x48], 0x17
mov eax, dword [esp + 0x10]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0x88], 0x16
mov dword [esp + 0x94], 0x15
mov edi, 0x14
jmp 0x406777
test edx, edx
je 0x40672b
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405e36
push dword [esp]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x405e36
mov dword [esp + 0x58], ecx
mov dword [esp + 0x8c], 0x18
mov dword [esp + 0x44], 0x10
mov ecx, 8
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x88], 0xe
mov edx, esi
mov byte [esp + 0x1b], dl
mov dword [esp + 0x94], 0xd
mov edi, 0xc
mov dword [esp], 0x10
mov edx, esi
mov ebx, dword [esp + 0x10]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + edi + 0x50], al
test cl, 0x20
jne 0x406792
mov ebx, edx
mov edx, esi
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
shrd edx, eax, cl
mov edi, dword [esp + 0x94]
mov byte [esp + edi + 0x50], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x4067b5
mov ebx, edx
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x10]
shrd esi, eax, cl
mov edx, esi
mov esi, dword [esp + 0x88]
mov byte [esp + esi + 0x50], bl
shr eax, cl
test cl, 0x20
jne 0x4067d9
mov eax, edx
mov ecx, dword [esp + 0x48]
mov byte [esp + ecx + 0x50], al
lea eax, [esp + 0x50]
mov esi, dword [esp]
push esi
push eax
push dword [esp + 0xc]
push dword [esp + 0x18]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405e36
mov eax, dword [esp]
add dword [esp + 0xc], eax
adc dword [esp + 4], 0
cmp dword [esp + 8], 0
je 0x406871
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x20]
mov eax, 0
sbb eax, dword [esp + 0x24]
jb 0x406833
xor eax, eax
jmp 0x406837
lea eax, [esp + 0x20]
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x28]
mov ecx, 0
sbb ecx, dword [esp + 0x2c]
jb 0x406852
mov edi, 0
jmp 0x406856
lea edi, [esp + 0x38]
jae 0x40685c
lea edx, [esp + 0x28]
lea ecx, [esp + 0xa0]
push eax
push edi
call fcn.004069d0
add esp, 8
mov dword [esp + 0x1c], eax
movzx ebx, word [esp + 0x90]
movzx esi, word [esp + 0x14]
movzx eax, word [esp + 0x1c]
movzx edi, word [esp + 0x4c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x3c]
push dword [esp + 0x30]
push dword [esp + 0x30]
push 0
push 0
push ebx
push esi
push dword [esp + 0x54]
push dword [esp + 0x64]
push dword [esp + 0x64]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push dword [esp + 0xd0]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x4c]
push edi
call fcn.00406a90
add esp, 0x4c
test eax, eax
je 0x405e36
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
mov ecx, dword [esp + 4]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x405e38