Function at 0x405790
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 eax, dword [ebp + 0x24]
mov edi, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], eax
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov esi, 6
test eax, eax
js 0x4057df
mov esi, eax
mov dword [esp + 4], edx
mov dword [esp], ecx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edi
or eax, edi
je 0x405800
mov edi, esi
and edi, 0x400
mov dx, 8
jmp 0x40581a
cmp dword [ebp + 0x14], 0
setne al
mov edi, esi
and edi, 0x400
sete cl
and cl, al
movzx edx, cl
shl edx, 3
mov eax, esi
xor eax, 0xfffeffff
mov ecx, esi
or ecx, 0x10000
test ecx, eax
jne 0x405836
movzx edx, dx
or edx, 0x800
mov dword [esp + 0x88], edx
and esi, 0xf
sete ah
test edi, edi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0xc], ecx
test ecx, ecx
je 0x405adb
cmp dword [ebx + 0x14], 2
jne 0x405adb
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x405adb
or dl, cl
je 0x405adb
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x405adb
cmp esi, 0xb
jae 0x405adb
mov edx, dword [esp + 0xc]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x4058cc
xor ebx, ebx
mov dword [esp + 8], 0
cmp ecx, 0xffffffff
jne 0x4058f0
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405ae4
cmp dword [esp + 0x14], 0
jne 0x4058e1
mov bl, 1
mov dword [esp + 8], ebx
cmp ecx, 0xffff
jne 0x4058f0
mov dword [edx + 0x34], 1
mov dword [esp + 8], 0
mov ecx, dword [esp + 0x10]
or ecx, dword [esp + 0x14]
je 0x40590d
test edi, edi
jne 0x40590d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405ae2
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
mov ebx, dword [ebp + 8]
jne 0x405924
mov dword [ebx + 0x1c], 0x19
jmp 0x405ae2
test edi, edi
je 0x405936
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
mov bl, 1
jmp 0x405984
or ah, al
mov byte [esp + 0x10], ah
mov ebx, dword [ebp + 0x14]
push ebx
push dword [ebp + 0x10]
push 0
call fcn.00403750
add esp, 0xc
mov dword [esp + 0x90], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], 0
mov eax, 0
cmp ebx, 4
setb bl
jb 0x405977
mov eax, esi
or bl, byte [esp + 0x10]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
mov esi, eax
push dword [ebp + 0xc]
call fcn.00408c40
add esp, 4
cmp eax, 0x10000
jb 0x4059a5
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405ae2
mov byte [esp + 0x2c], bl
movzx ecx, word [ebp + 0x1c]
mov dword [esp + 0x84], ecx
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x28], eax
call fcn.00406340
mov ecx, dword [esp + 0xc]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov edx, dword [esp + 0x28]
add edx, dword [esp + 0x84]
setb cl
add edx, dword [esp + 0x24]
adc ecx, 0
mov dword [esp + 0x20], eax
add edx, 0x4a
adc ecx, 0
mov eax, 0xfffffffe
cmp eax, edx
mov eax, 0
sbb eax, ecx
jae 0x405a0d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405ae4
cmp byte [esp + 8], 0
je 0x405aa7
mov eax, dword [esp + 0x28]
mov edx, eax
shr edx, 0x1f
lea ebx, [eax + eax]
add ebx, dword [esp + 0x84]
adc edx, 0
add ebx, dword [esp + 0x20]
adc edx, 0
mov eax, dword [ebp + 8]
add ebx, dword [eax]
adc edx, dword [eax + 4]
add ebx, 0x4c
adc edx, 0
mov ecx, ebx
and ecx, dword [ebp + 0x38]
mov eax, ecx
shr eax, 0x1f
mov dword [esp + 0x8c], eax
add ecx, ecx
mov dword [esp + 0x1c], ecx
xor ebx, dword [ebp + 0x38]
mov dword [esp + 8], 0
mov ecx, dword [ebp + 0x40]
add ecx, dword [esp + 0x24]
mov eax, 0
adc eax, 0xffffffff
add ecx, ebx
adc eax, edx
add ecx, dword [esp + 0x1c]
adc eax, dword [esp + 0x8c]
add ecx, 0x26
mov ecx, dword [esp + 0x28]
adc eax, 0
cmp eax, 0xffffffff
je 0x405ab3
mov eax, dword [esp + 0xc]
mov dword [eax + 0x34], 1
mov dword [esp + 8], 0x1c
jmp 0x405ab3
mov dword [esp + 8], 0x1c
mov ecx, dword [esp + 0x28]
xor edx, edx
test ecx, ecx
je 0x405aee
mov eax, dword [ebp + 0xc]
cmp byte [eax + ecx - 1], 0x2f
mov ebx, dword [ebp + 8]
jne 0x405af1
cmp dword [ebp + 0x14], 0
jne 0x405adb
mov edx, 0x10
mov eax, dword [esp + 0x10]
or eax, dword [esp + 0x14]
je 0x405af1
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 dword [esp + 0x8c], edx
lea eax, [ecx + 0x2e]
mov ecx, eax
mov edx, dword [esp + 0x84]
and ecx, edx
xor eax, edx
lea eax, [eax + ecx*2]
add eax, dword [esp + 8]
add eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xc]
cmp dword [ecx + 8], eax
jae 0x405b35
push 1
push eax
push ecx
push ebx
call fcn.004089a0
mov ecx, dword [esp + 0x1c]
add esp, 0x10
test eax, eax
je 0x405c6a
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x405b56
add ecx, 0x10
push 1
push eax
push ecx
push ebx
call fcn.004089a0
add esp, 0x10
test eax, eax
je 0x405c6a
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x2c]
jne 0x405b7d
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x405c6a
mov dword [esp + 8], eax
mov ecx, ebx
mov edx, dword [esp]
push dword [esp + 0x20]
mov ebx, dword [esp + 8]
push ebx
call fcn.00406370
add esp, 8
test eax, eax
je 0x405c76
test edi, edi
setne al
mov ecx, dword [esp]
add ecx, dword [esp + 0x20]
mov dword [esp], ecx
adc ebx, 0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebx
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 ecx, byte [esp + 0x2c]
xor cl, 1
or cl, al
mov byte [esp + 0x20], cl
movzx eax, cl
shl eax, 3
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
mov edi, ebx
je 0x405c8b
xor eax, eax
mov edx, 0xfffffffe
cmp edx, dword [esp + 0x10]
mov ecx, 0
sbb ecx, dword [esp + 0x14]
mov ebx, dword [esp]
jb 0x405c52
xor ecx, ecx
cmp edx, ebx
sbb ecx, edi
mov dword [esp + 0xc], ebx
mov ecx, edi
mov dword [esp + 0x1c], 0
jae 0x405dc6
xor eax, eax
cmp edx, ebx
mov ecx, 0
sbb ecx, edi
jb 0x405d7f
xor ecx, ecx
jmp 0x405d83
mov dword [ebx + 0x1c], 0x10
jmp 0x405ae2
push dword [esp + 8]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405ae2
test edi, edi
mov ecx, dword [esp + 0x88]
je 0x405ca5
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405ae2
mov dword [esp + 0x64], 0x4034b50
movzx eax, byte [esp + 0x20]
test al, al
je 0x405cb8
mov al, 0x14
mov byte [esp + 0x68], al
movzx eax, cx
mov byte [esp + 0x6a], cl
mov byte [esp + 0x6b], ah
mov eax, dword [esp + 0x24]
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 + 0x28]
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 edi
push dword [esp + 0xc]
mov dword [esp + 0x14], edi
mov edi, dword [ebp + 8]
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405ed8
mov ecx, dword [esp]
add ecx, 0x1e
mov eax, dword [esp + 4]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
mov dword [esp + 0xc], ecx
push ecx
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405ecb
add dword [esp], ebx
adc dword [esp + 4], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], 0
jmp 0x405eec
lea ecx, [esp + 0x38]
cmp edx, dword [esp + 0x10]
mov edx, 0
sbb edx, dword [esp + 0x14]
jb 0x405d99
mov edx, 0
jmp 0x405d9d
lea edx, [esp + 0x30]
jae 0x405da3
lea eax, [esp + 0x40]
lea ebx, [esp + 0xa0]
push ecx
push edx
push eax
mov dword [esp + 0x28], ebx
push ebx
call fcn.00406410
add esp, 0x10
mov ecx, dword [esp + 0x38]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], edi
mov dword [esp + 0x10], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x64], 0x4034b50
movzx eax, byte [esp + 0x20]
test al, al
je 0x405de6
mov al, 0x14
mov byte [esp + 0x68], al
mov byte [esp + 0x69], 0
movzx ebx, word [esp + 0x88]
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bh
mov ebx, dword [esp + 0x24]
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 + 0x28]
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 dword [esp + 0x18]
mov edi, dword [ebp + 8]
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405ed8
mov eax, dword [esp]
add eax, 0x1e
mov ecx, dword [esp + 4]
adc ecx, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], ecx
push ecx
mov dword [esp + 0xc], eax
push eax
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405ecb
mov ecx, dword [esp]
add ecx, ebx
mov edx, dword [esp + 4]
adc edx, 0
cmp dword [esp + 0x1c], 0
mov dword [esp], ecx
mov dword [esp + 4], edx
je 0x405ee4
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x10]
push ebx
push eax
push edx
push ecx
push dword [edi + 0x44]
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405ed8
add dword [esp], ebx
adc dword [esp + 4], 0
jmp 0x405eec
push dword [esp + 8]
push dword [edi + 0x34]
call dword [edi + 0x2c]
add esp, 8
mov dword [edi + 0x1c], 0x13
jmp 0x405ae2
mov dword [esp + 0x1c], 0
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x405f16
push eax
push dword [ebp + 0x34]
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [edi + 0x44]
mov ebx, eax
call dword [edi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405ed8
add dword [esp], ebx
adc dword [esp + 4], 0
cmp byte [esp + 0x2c], 0
je 0x405f5b
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0xc]
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x40610a
mov ecx, esi
add dword [esp], esi
adc dword [esp + 4], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
jmp 0x40600a
cmp dword [ebp + 0x14], 0
je 0x40600a
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
cmp esi, 4
setb al
shl eax, 0xe
or eax, dword [esi*4 + 0x43f84c]
test esi, esi
jne 0x405fa6
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x405880
mov esi, dword [esp + 0x14]
push esi
call fcn.00404c40
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.00403830
add esp, 0x18
cmp eax, 1
jne 0x40612f
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], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
push dword [esp + 8]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
or ecx, eax
je 0x406126
mov dword [esp + 0x48], 0x8074b50
mov edx, dword [esp + 0x90]
mov byte [esp + 0x4c], dl
mov byte [esp + 0x4d], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x4e], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x4f], cl
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x1c], 0
je 0x40614b
mov byte [esp + 0x50], dl
mov byte [esp + 0x51], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x52], bl
mov ebx, ecx
shr ebx, 0x10
shr edx, 0x18
mov byte [esp + 0x53], dl
mov edx, ecx
shr edx, 0x18
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov byte [esp + 0x56], bl
mov byte [esp + 0x57], dl
mov edx, dword [esp + 0x14]
mov byte [esp + 0x58], dl
mov byte [esp + 0x59], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x5a], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x5b], cl
mov dword [esp + 0x20], 0x38
mov dword [esp + 0x98], 0x30
mov ecx, 0x28
mov esi, 0x18
mov dword [esp + 8], 0x17
mov eax, dword [esp + 0xc]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0x2c], 0x16
mov dword [esp + 0x94], 0x15
mov edi, 0x14
jmp 0x40619e
push dword [esp + 8]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405ae2
xor eax, eax
xor ecx, ecx
jmp 0x40624a
push dword [esp + 8]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x405ae2
test ecx, ecx
jne 0x405c96
mov dword [esp + 0x50], edx
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x98], 0x10
mov ecx, 8
mov dword [esp + 8], 0xf
mov dword [esp + 0x2c], 0xe
mov edx, dword [esp + 0x14]
mov eax, edx
mov byte [esp + 0x1b], dl
mov dword [esp + 0x94], 0xd
mov edi, 0xc
mov esi, 0x10
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0xc]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + edi + 0x48], al
test cl, 0x20
jne 0x4061bb
mov ebx, edx
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x98]
mov eax, dword [esp + 0xc]
shrd edx, eax, cl
mov edi, dword [esp + 0x94]
mov byte [esp + edi + 0x48], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x4061e3
mov ebx, edx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
shrd edx, eax, cl
mov edi, dword [esp + 0x2c]
mov byte [esp + edi + 0x48], bl
shr eax, cl
test cl, 0x20
jne 0x406203
mov eax, edx
mov ecx, dword [esp + 8]
mov byte [esp + ecx + 0x48], al
lea eax, [esp + 0x48]
push esi
push eax
push dword [esp + 0xc]
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405ae2
mov ecx, dword [esp]
mov eax, ecx
and eax, esi
add eax, eax
xor ecx, esi
add ecx, eax
mov dword [esp], ecx
adc dword [esp + 4], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x1c], 0
je 0x4062af
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x38]
mov esi, 0
sbb esi, dword [esp + 0x3c]
jb 0x40626b
xor edi, edi
jmp 0x40626f
lea edi, [esp + 0x38]
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x406286
mov eax, 0
jmp 0x40628a
lea eax, [esp + 0x30]
jae 0x406290
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
push edi
push eax
push edx
push ecx
call fcn.00406410
add esp, 0x10
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
movzx ebx, word [esp + 0x88]
movzx esi, word [esp + 0x24]
movzx edx, word [esp + 0x10]
movzx edi, word [esp + 0x28]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x94]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push ebx
push esi
push dword [esp + 0xb4]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push eax
push dword [esp + 0xbc]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x60]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004064d0
add esp, 0x54
test eax, eax
je 0x405ae2
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp]
mov dword [eax], ecx
mov ecx, dword [esp + 4]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x405ae4