Function at 0x406348
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 edx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [esp + 0x38], edx
mov dword [esp + 4], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov edi, 6
test eax, eax
js 0x406397
mov edi, eax
mov dword [esp + 0x18], esi
mov eax, esi
mov dword [esp + 0xc], ecx
or eax, ecx
je 0x4063b3
mov esi, edi
and esi, 0x400
mov ax, 8
jmp 0x4063cd
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 + 8], edx
jne 0x4063e1
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x88], eax
and edi, 0xf
sete ah
test esi, esi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x406676
cmp dword [ebx + 0x14], 2
jne 0x406676
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x406676
or dl, cl
je 0x406676
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x406676
cmp edi, 0xb
jae 0x406676
mov edx, dword [esp + 0x14]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x40646f
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x406489
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x40667f
cmp dword [esp + 0xc], 0
jne 0x406480
mov bl, 1
cmp ecx, 0xffff
jne 0x406489
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 0x18]
or ecx, dword [esp + 0xc]
je 0x4064a6
test esi, esi
jne 0x4064a6
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x40667d
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x40652a
test esi, esi
je 0x4064c3
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x8c], eax
mov byte [esp + 0x28], 1
jmp 0x406518
or ah, al
mov byte [esp + 0x18], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.004040e8
add esp, 0xc
mov dword [esp + 0x8c], eax
mov dword [esp + 0xc], 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 0x406507
mov eax, edi
or cl, byte [esp + 0x18]
mov byte [esp + 0x28], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x18], ecx
mov edi, eax
push dword [ebp + 0xc]
call fcn.00409778
add esp, 4
cmp eax, 0x10000
jb 0x406539
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x40667d
mov dword [esp + 0x2c], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x84], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x20]
mov eax, dword [ecx + 0x24]
or eax, edx
je 0x406566
lea eax, [edx - 1]
mov ecx, dword [ecx]
and ecx, eax
sub edx, ecx
and edx, eax
mov dword [esp + 0x24], edx
jmp 0x40656e
mov dword [esp + 0x24], 0
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 4]
xor eax, eax
mov ecx, dword [esp + 0x2c]
add ecx, dword [esp + 0x84]
setb al
mov dword [esp + 0x10], edx
add ecx, edx
adc eax, 0
add ecx, 0x4b
adc eax, 0xffffffff
cmp ecx, 1
sbb eax, 0xffffffff
jae 0x4065ab
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x40667d
mov ecx, 0x1c
test bl, bl
je 0x40663b
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 4]
mov edx, dword [eax]
add edx, dword [esp + 0x24]
adc ebx, 0
add edx, 0x1e
adc ebx, 0
mov dword [esp + 0x20], ebx
mov ebx, edx
mov ecx, dword [esp + 0x2c]
and ebx, ecx
mov eax, ebx
shr eax, 0x1f
mov dword [esp + 0x80], eax
add ebx, ebx
xor edx, ecx
mov ecx, dword [esp + 0x84]
add ecx, dword [ebp + 0x38]
mov eax, 0xffffffff
adc eax, 0
add ecx, dword [ebp + 0x40]
adc eax, 0
add ecx, dword [esp + 0x2c]
adc eax, 0
add ecx, dword [esp + 0x10]
adc eax, 0
add ecx, edx
adc eax, dword [esp + 0x20]
add ecx, ebx
adc eax, dword [esp + 0x80]
add ecx, 0x54
adc eax, 0
xor ecx, ecx
cmp eax, 0xffffffff
jae 0x40663b
mov eax, dword [esp + 0x14]
mov dword [eax + 0x34], 1
mov ecx, 0x1c
mov dword [esp + 0x80], 0
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x406689
mov eax, dword [ebp + 0xc]
cmp byte [eax + edx - 1], 0x2f
mov ebx, dword [ebp + 8]
jne 0x40668c
cmp dword [ebp + 0x14], 0
jne 0x406676
mov dword [esp + 0x80], 0x10
mov eax, dword [esp + 0x18]
or eax, dword [esp + 0xc]
je 0x40668c
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]
lea eax, [edx + 0x2e]
mov edx, eax
mov dword [esp + 0x20], ecx
mov ecx, ebx
mov ebx, dword [esp + 0x84]
and edx, ebx
xor eax, ebx
mov ebx, ecx
lea eax, [eax + edx*2]
add eax, dword [esp + 0x20]
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 8], eax
jae 0x4066d5
mov ecx, ebx
mov edx, dword [esp + 0x14]
push 1
push eax
call fcn.004095b8
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x4067fd
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x4066fa
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 0x10]
mov ecx, ebx
push 1
push eax
call fcn.004095b8
add esp, 8
test eax, eax
je 0x4067fd
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x28]
jne 0x406721
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x4067fd
mov dword [esp + 0x10], eax
mov ecx, ebx
mov edx, dword [esp + 8]
push dword [esp + 0x24]
mov ebx, dword [esp + 8]
push ebx
call fcn.00406ee8
add esp, 8
test eax, eax
je 0x406809
test esi, esi
setne al
mov ecx, dword [esp + 8]
add ecx, dword [esp + 0x24]
mov dword [esp + 8], ecx
adc ebx, 0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebx
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
movzx ecx, byte [esp + 0x28]
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 + 0x14]
cmp dword [eax + 0x34], 0
mov edx, ebx
je 0x40681e
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x18]
mov esi, 0
sbb esi, dword [esp + 0xc]
mov ebx, dword [esp + 8]
mov dword [esp + 4], edx
jb 0x406831
cmp ecx, ebx
mov esi, 0
sbb esi, edx
jb 0x406831
mov esi, ebx
mov ecx, edx
mov dword [esp + 0xc], 0
jmp 0x406969
mov dword [ebx + 0x1c], 0x10
jmp 0x40667d
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x40667d
test edx, edx
je 0x406847
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x40667d
cmp ecx, ebx
mov esi, 0
sbb esi, edx
jb 0x406924
xor ebx, ebx
jmp 0x406928
mov dword [esp + 0x60], 0x4034b50
movzx eax, byte [esp + 0x20]
test al, al
je 0x40685a
mov al, 0x14
mov byte [esp + 0x64], al
mov ecx, dword [esp + 0x88]
movzx eax, cx
mov byte [esp + 0x66], cl
mov byte [esp + 0x67], ah
mov eax, dword [esp + 0x24]
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 + 0x2c]
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
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [ebp + 8]
push dword [ecx + 0x44]
mov esi, eax
mov dword [esp + 0x18], edx
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406ab0
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
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406b05
add esi, ebx
mov ecx, dword [esp + 4]
adc ecx, 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], 0
mov ebx, esi
jmp 0x406a80
lea ebx, [esp + 0x38]
mov esi, dword [esp + 0xc]
cmp ecx, dword [esp + 0x18]
mov ecx, 0
sbb ecx, esi
jb 0x406940
mov esi, 0
jmp 0x406944
lea esi, [esp + 0x30]
jae 0x40694a
lea eax, [esp + 0x40]
lea ecx, [esp + 0xa0]
mov dword [esp + 0xc], ecx
mov edx, eax
push ebx
push esi
call fcn.00406f98
add esp, 8
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x14], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x60], 0x4034b50
movzx eax, byte [esp + 0x20]
test al, al
je 0x406985
mov al, 0x14
mov byte [esp + 0x64], al
mov byte [esp + 0x65], 0
movzx ebx, word [esp + 0x88]
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], bh
mov ebx, dword [esp + 0x24]
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 + 0x2c]
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 0x406b15
mov eax, dword [esp + 8]
add eax, 0x1e
mov ecx, esi
mov esi, dword [esp + 4]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
mov dword [esp + 0x14], eax
push eax
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406b05
mov eax, dword [esp + 8]
add eax, ebx
adc esi, 0
cmp dword [esp + 0xc], 0
mov ebx, eax
mov ecx, esi
je 0x406a78
lea eax, [esp + 0xa0]
mov esi, dword [esp + 0x14]
push esi
push eax
push ecx
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov dword [esp + 0x18], ecx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406ab0
mov eax, ebx
and eax, esi
mov ecx, eax
shr ecx, 0x1f
add eax, eax
xor ebx, esi
add ebx, eax
mov eax, dword [esp + 4]
adc eax, ecx
mov ecx, eax
jmp 0x406a80
mov dword [esp + 0xc], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 4], ecx
je 0x406abf
push eax
push dword [ebp + 0x34]
push ecx
push ebx
mov edx, dword [ebp + 8]
push dword [edx + 0x44]
mov esi, eax
call dword [edx + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406ab0
add ebx, esi
mov dword [esp + 8], ebx
adc dword [esp + 4], 0
jmp 0x406ac3
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x40667d
mov dword [esp + 8], ebx
cmp byte [esp + 0x28], 0
je 0x406b21
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 0x406b05
mov ecx, esi
add dword [esp + 8], esi
adc dword [esp + 4], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
jmp 0x406bde
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 0x40667d
cmp dword [ebp + 0x14], 0
je 0x406bde
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 8]
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
mov edx, dword [edi*4 + 0x43984c]
xor ecx, ecx
cmp edi, 4
setb cl
shl ecx, 0xe
mov eax, edx
xor eax, ecx
not ecx
and ecx, edx
add eax, edx
sub eax, ecx
test edi, edi
jne 0x406b79
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x407000
mov esi, dword [esp + 0x1c]
push esi
call fcn.00405648
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.00404208
add esp, 0x18
cmp eax, 1
jne 0x406ce4
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 + 8], eax
mov eax, dword [esp + 0x54]
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 esi, eax
mov dword [esp + 0x18], ecx
or eax, ecx
je 0x406cdb
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 + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0xc], 0
je 0x406d00
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 + 0x20], 0x38
mov dword [esp + 0x94], 0x30
mov ecx, 0x28
mov dword [esp + 0x28], 0x18
mov dword [esp + 0x10], 0x17
mov eax, dword [esp + 0x18]
mov byte [esp + 0x1f], al
mov dword [esp + 0x98], 0x16
mov dword [esp + 0x90], 0x15
mov edi, 0x14
jmp 0x406d55
xor eax, eax
xor ecx, ecx
jmp 0x406df8
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 0x40667d
test ecx, ecx
jne 0x406822
mov dword [esp + 0x50], ebx
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x94], 0x10
mov ecx, 8
mov dword [esp + 0x10], 0xf
mov dword [esp + 0x98], 0xe
mov eax, esi
mov byte [esp + 0x1f], al
mov dword [esp + 0x90], 0xd
mov edi, 0xc
mov dword [esp + 0x28], 0x10
mov ebx, esi
mov eax, dword [esp + 0x18]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1f]
mov byte [esp + edi + 0x48], dl
test cl, 0x20
jne 0x406d70
mov eax, ebx
mov ebx, esi
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x18]
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 0x406d96
mov eax, ebx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
shrd esi, edx, cl
mov edi, dword [esp + 0x98]
mov byte [esp + edi + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x406db5
mov edx, esi
mov eax, dword [esp + 0x10]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x28]
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 0x40667d
mov eax, dword [esp + 0x28]
add dword [esp + 8], eax
adc dword [esp + 4], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0xc], 0
je 0x406e56
xor edx, edx
mov ebx, 0xfffffffe
cmp ebx, dword [esp + 0x38]
mov esi, 0
sbb esi, dword [esp + 0x3c]
jb 0x406e19
xor edi, edi
jmp 0x406e1d
lea edi, [esp + 0x38]
cmp ebx, eax
mov eax, 0
sbb eax, ecx
jb 0x406e2f
mov eax, 0
jmp 0x406e33
lea eax, [esp + 0x30]
jae 0x406e39
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
push edi
push eax
call fcn.00406f98
add esp, 8
mov dword [esp + 0x14], 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 + 0x14]
movzx edi, word [esp + 0x2c]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x88]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push ebx
push esi
push dword [esp + 0xb0]
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 + 0x50]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00407058
add esp, 0x54
test eax, eax
je 0x40667d
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 0x40667f