Function at 0x40f960
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x154
push ebx
push esi
push edi
mov dword [esp + 0x10], ecx
call fcn.0040c310
lea eax, [esp + 0x108]
mov esi, 2
or edx, 0xffffffff
jmp 0x40f990
mov ecx, 5
mov dword [eax + 4], edx
mov dword [eax], edx
add eax, 8
sub ecx, 1
jne 0x40f995
sub esi, 1
jne 0x40f990
mov esi, dword [ebp + 8]
xor edi, edi
or eax, 0xffffffff
mov ebx, 3
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0xcc], edi
mov dword [esp + 0xd0], edi
mov dword [esp + 0xd4], edi
mov dword [esp + 0xd8], edi
mov dword [esp + 0xdc], edi
mov dword [esp + 0xe0], edi
mov dword [esp + 0xe4], edi
mov dword [esp + 0xe8], edi
mov dword [esp + 0xec], edi
mov dword [esp + 0xf0], edi
mov dword [esp + 0xf4], edi
mov dword [esp + 0xf8], edi
mov dword [esp + 0xfc], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], edi
mov byte [esp + 0xf], 0
cmp esi, 0x11
ja case.default.0x410549
movzx eax, byte [esi + 0x410c80]
jmp dword [eax*4 + 0x410c5c]
push 0x34
lea ecx, [esp + 0x9c]
push edi
push ecx
mov byte [esp + 0x1b], 0
call fcn.00428f30
add esp, 0xc
call fcn.0042ad50
cdq
mov ecx, 0x64
idiv ecx
test edx, edx
jge 0x40fc30
call fcn.0042ad50
mov edi, eax
and edi, 0x80000007
jns 0x40facb
dec edi
or edi, 0xfffffff8
inc edi
call fcn.0042ad50
mov esi, eax
and esi, 0x80000003
jns 0x40fadf
dec esi
or esi, 0xfffffffc
inc esi
mov eax, 4
mov ebx, 5
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], eax
call fcn.0042ad50
cdq
idiv ebx
mov eax, dword [esp + edx*4 + 0x14]
add eax, eax
add eax, eax
add eax, eax
dec ebx
mov dword [esp + eax + 0x10c], edi
mov dword [esp + eax + 0x108], esi
inc edi
lea ecx, [esp + edx*4 + 0x14]
mov edx, dword [esp + ebx*4 + 0x14]
mov dword [ecx], edx
call fcn.0042ad50
and eax, 0x80000001
jns 0x40fb4e
dec eax
or eax, 0xfffffffe
inc eax
lea esi, [esi + eax + 1]
cmp esi, 4
jl 0x40fb59
xor esi, esi
sub dword [esp + 0x30], 1
jne 0x40fb11
mov ebx, dword [esp + 0x14]
add ebx, ebx
add ebx, ebx
add ebx, ebx
call fcn.0042ad50
cmp edi, 8
jl 0x40fb85
cdq
mov ecx, 3
idiv ecx
mov dword [esp + ebx + 0x10c], edx
jmp 0x40fb9b
and eax, 0x80000003
jns 0x40fb91
dec eax
or eax, 0xfffffffc
inc eax
add eax, 9
mov dword [esp + ebx + 0x10c], eax
mov dword [esp + ebx + 0x108], esi
call fcn.0042ad50
and eax, 0x80000001
jns 0x40fbb3
dec eax
or eax, 0xfffffffe
inc eax
lea esi, [esi + eax + 1]
cmp esi, 4
jl 0x40fbbe
xor esi, esi
call fcn.0042ad50
cmp edi, 8
jl 0x40fbd9
cdq
mov ecx, 3
idiv ecx
mov dword [esp + 0x134], edx
jmp 0x40fbef
and eax, 0x80000003
jns 0x40fbe5
dec eax
or eax, 0xfffffffc
inc eax
add eax, 9
mov dword [esp + 0x134], eax
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x130], esi
lea esi, [esp + 0x138]
mov edi, 4
lea edx, [esp + 0x90]
push edx
mov ecx, ebx
call fcn.0040c2b0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esi], ecx
mov dword [esi + 4], edx
add esi, 8
sub edi, 1
jne 0x40fc06
jmp 0x40fda5
xor ebx, ebx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x88]
push eax
call fcn.0040c2b0
mov edx, dword [eax]
cmp dword [esp + edx*4 + 0x74], 3
mov ecx, dword [eax + 4]
lea eax, [esp + edx*4 + 0x74]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x68], eax
jge 0x40fd1b
mov esi, dword [esp + ecx*4 + 0xcc]
cmp esi, 2
lea eax, [esp + ecx*4 + 0xcc]
mov dword [esp + 0x60], eax
jge 0x40fd1b
cmp esi, 1
jne 0x40fc8f
test edi, edi
je 0x40fd1b
cmp esi, esi
je 0x40fd1b
jl 0x40fc9c
cmp byte [esp + 0xf], 0
jne 0x40fd1b
mov edx, 1
xor eax, eax
test eax, eax
jle 0x40fcc8
cmp dword [esp + eax*4 + 0x94], 1
jl 0x40fd84
cmp dword [esp + eax*4 + 0x98], 1
jge 0x40fcc7
cmp ecx, eax
jne 0x40fd84
inc edx
cmp edx, 3
jge 0x40fd1b
inc eax
cmp eax, 0xd
jl 0x40fca3
mov edx, dword [esp + 0x6c]
inc dword [esp + ecx*4 + 0x98]
lea eax, [ebx + edi*4]
add eax, edi
add eax, eax
add eax, eax
add eax, eax
mov dword [esp + eax + 0x10c], ecx
mov dword [esp + eax + 0x108], edx
lea eax, [esp + ecx*4 + 0x98]
mov ecx, dword [esp + 0x60]
lea eax, [esi + 1]
mov dword [ecx], eax
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx]
inc edx
inc ebx
cmp eax, 2
mov dword [ecx], edx
jl 0x40fd1b
mov byte [esp + 0xf], 1
cmp ebx, 5
jge 0x40fd97
mov edx, dword [esp + 0x10]
cmp dword [edx + 0x6e0], 5
jg 0x40fc32
push 0x34
xor ebx, ebx
lea eax, [esp + 0xd0]
push ebx
push eax
xor edi, edi
call fcn.00428f30
xor eax, eax
push 0x34
push eax
lea ecx, [esp + 0xac]
push ecx
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
call fcn.00428f30
mov ecx, dword [esp + 0x28]
add esp, 0x18
call fcn.0040c310
jmp 0x40fc32
cmp edx, 5
jge 0x40fcc8
mov edx, 1
jmp 0x40fccd
inc edi
cmp edi, 2
jl 0x40fc30
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x110]
lea ecx, [ebx + 0x804]
mov edx, 2
mov esi, dword [eax - 8]
mov dword [ecx - 8], esi
mov esi, dword [eax - 4]
mov dword [ecx - 4], esi
mov esi, dword [eax]
mov dword [ecx], esi
mov esi, dword [eax + 4]
mov dword [ecx + 4], esi
mov esi, dword [eax + 8]
mov dword [ecx + 8], esi
mov esi, dword [eax + 0xc]
mov dword [ecx + 0xc], esi
mov esi, dword [eax + 0x10]
mov dword [ecx + 0x10], esi
mov esi, dword [eax + 0x14]
mov dword [ecx + 0x14], esi
mov esi, dword [eax + 0x18]
mov dword [ecx + 0x18], esi
mov esi, dword [eax + 0x1c]
mov dword [ecx + 0x1c], esi
add eax, 0x28
add ecx, 0x28
sub edx, 1
jne 0x40fdb7
xor edi, edi
lea esi, [ebx + 0x7fc]
cmp dword [esi + 4], 0
jl 0x40fe0f
cmp dword [esi], 0
jge 0x40fe32
cmp dword [ebp + 8], 0xe
jl 0x410bf1
lea eax, [esp + 0x100]
push eax
mov ecx, ebx
call fcn.0040c2b0
mov ecx, dword [eax]
mov dword [esi], ecx
mov edx, dword [eax + 4]
mov dword [esi + 4], edx
inc edi
add esi, 8
cmp edi, 0xa
jl 0x40fe04
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call fcn.0042ad50
and eax, 0x80000003
jns 0x40fe57
dec eax
or eax, 0xfffffffc
inc eax
add eax, 9
cmp byte [ebp + 0xc], 0
je 0x40fe65
mov eax, 0xc
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], 2
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov esi, dword [esp + 0x10]
mov edi, edx
mov dword [esp + 0x14], edi
lea esp, [esp]
call fcn.0042ad50
cdq
mov ecx, 7
idiv ecx
cmp byte [esi + 0x9f8], 0
mov dword [esp + 0x18], edx
je 0x40febb
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov dword [esp + 0x18], edx
cmp byte [esi + 0x550], 0
je 0x40fedf
call fcn.0042ad50
mov edx, eax
and edx, 0x80000001
jns 0x40fed8
dec edx
or edx, 0xfffffffe
inc edx
add edx, 5
mov dword [esp + 0x18], edx
cmp edi, edx
je 0x40fe90
cmp edx, 5
jl case.default.0x410549
mov byte [esp + 0xf], 1
jmp case.default.0x410549
mov dword [esp + 0x28], 4
call fcn.0042ad50
cdq
mov ecx, 0xd
idiv ecx
mov edi, edx
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], 0
je 0x40ff3b
call fcn.00424370
cmp eax, 0x64
jge 0x40ff3b
call fcn.0042ad50
mov edi, eax
and edi, 0x80000003
jns 0x40ff38
dec edi
or edi, 0xfffffffc
inc edi
add edi, 9
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], edi
call fcn.0042ad50
cdq
mov ecx, 0xd
idiv ecx
cmp byte [ebx + 0x9f8], 0
mov esi, edx
je 0x40ff80
call fcn.00424370
cmp eax, 0x64
jge 0x40ff80
call fcn.0042ad50
mov esi, eax
and esi, 0x80000003
jns 0x40ff7d
dec esi
or esi, 0xfffffffc
inc esi
add esi, 9
cmp esi, edi
je 0x40ff47
mov dword [esp + 0x48], esi
mov dword [esp + 0x50], esi
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
xor bl, bl
mov dword [esp + 0x14], edx
call fcn.0042ad50
cdq
mov ecx, 0x64
idiv ecx
mov edi, dword [esp + 0x10]
cmp edx, 0x3c
jge 0x40ffbf
cmp byte [edi + 0x9f8], bl
jne 0x40ffbf
mov bl, 1
mov esi, 1
cmp byte [edi + 0x550], 0
jne 0x40ffee
test bl, bl
je 0x40ffdf
cmp esi, 1
jle 0x40ffdf
cmp byte [edi + 0x9f8], 0
je 0x40ffee
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
jmp 0x40fffe
call fcn.0042ad50
cdq
mov ecx, 3
idiv ecx
add edx, 5
xor eax, eax
mov dword [esp + esi*4 + 0x14], edx
test esi, esi
jle 0x41001b
mov ecx, edx
lea ebx, [ebx]
cmp ecx, dword [esp + eax*4 + 0x14]
je 0x40ffc4
inc eax
cmp eax, esi
jl 0x410010
inc esi
cmp esi, 4
jl 0x40ffc4
jmp case.default.0x410549
mov dword [esp + 0x28], ebx
call fcn.0042ad50
cdq
mov ecx, 9
idiv ecx
cmp esi, 4
je 0x410056
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x9f8], 0
je 0x410106
cmp esi, 5
je 0x41010f
call fcn.0042ad50
cdq
idiv ebx
add edx, 9
cmp edx, 9
mov dword [esp + 0x38], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], edx
mov byte [esp + 0xe], 0
jl 0x410093
call fcn.0042ad50
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0x28
jge 0x410093
mov byte [esp + 0xf], 1
mov byte [esp + 0xe], 1
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
xor bl, bl
mov dword [esp + 0x14], edx
call fcn.0042ad50
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0x3c
jge 0x4100c6
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], bl
jne 0x4100c6
mov bl, 1
mov edi, dword [esp + 0x10]
mov esi, 1
nop
cmp byte [edi + 0x550], 0
jne 0x410119
test bl, bl
je 0x4100e2
cmp esi, 1
jg 0x410119
cmp byte [esp + 0xe], 0
je 0x4100f7
cmp esi, 1
jl 0x4100f7
cmp byte [edi + 0x9f8], 0
je 0x410119
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
jmp 0x410129
cmp esi, 5
jne 0x410061
mov edx, 0xc
jmp 0x410061
call fcn.0042ad50
cdq
mov ecx, 3
idiv ecx
add edx, 5
xor eax, eax
mov dword [esp + esi*4 + 0x14], edx
test esi, esi
jle 0x410140
mov ecx, edx
cmp ecx, dword [esp + eax*4 + 0x14]
je 0x4100d0
inc eax
cmp eax, esi
jl 0x410135
inc esi
cmp esi, 3
jl 0x4100d0
jmp case.default.0x410549
mov dword [esp + 0x28], 5
call fcn.0042ad50
and eax, 0x80000007
jns 0x410164
dec eax
or eax, 0xfffffff8
inc eax
cmp esi, 7
jne 0x41016d
xor eax, eax
jmp 0x410174
cmp esi, 8
jne 0x410174
mov eax, esi
lea edx, [eax + 1]
mov dword [esp + 0x40], edx
lea ecx, [eax + 2]
lea edx, [eax + 3]
mov dword [esp + 0x38], eax
add eax, 4
mov dword [esp + 0x48], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x58], eax
cmp esi, 7
jne 0x4101a1
mov dword [esp + 0x58], 0xc
xor bl, bl
or edi, 0xffffffff
call fcn.0042ad50
cdq
mov ecx, 6
idiv ecx
mov dword [esp + 0x14], edx
call fcn.0042ad50
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0x46
jge 0x4101ce
lea edi, [ecx - 0x60]
mov bl, 1
mov esi, 1
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov dword [esp + esi*4 + 0x14], edx
cmp dword [esp + 0x14], ecx
jge 0x4101f6
test bl, bl
je 0x4101f6
cmp esi, edi
jne 0x4101f6
mov dword [esp + esi*4 + 0x14], ecx
xor eax, eax
test esi, esi
jle 0x41020b
mov ecx, dword [esp + esi*4 + 0x14]
cmp ecx, dword [esp + eax*4 + 0x14]
je 0x4101d3
inc eax
cmp eax, esi
jl 0x410200
inc esi
cmp esi, 5
jl 0x4101d3
jmp case.default.0x410549
mov dword [esp + 0x28], 5
call fcn.0042ad50
and eax, 0x80000003
jns 0x41022f
dec eax
or eax, 0xfffffffc
inc eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], eax
call fcn.0042ad50
cdq
mov ecx, ebx
idiv ecx
mov dword [esp + 0x38], edx
call fcn.0042ad50
cdq
mov ecx, ebx
idiv ecx
add edx, ebx
mov dword [esp + 0x40], edx
call fcn.0042ad50
cdq
mov ecx, ebx
idiv ecx
add edx, 6
mov dword [esp + 0x48], edx
call fcn.0042ad50
cdq
idiv ebx
add edx, 9
mov dword [esp + 0x50], edx
call fcn.0042ad50
cdq
mov ecx, 0xd
idiv ecx
xor eax, eax
cmp edx, dword [esp + eax*8 + 0x38]
je 0x410285
inc eax
cmp eax, 5
jl 0x410294
mov dword [esp + 0x58], edx
xor bl, bl
call fcn.0042ad50
cdq
mov ecx, 6
idiv ecx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], bl
jne 0x4102c5
mov bl, 1
mov esi, 1
lea edi, [esi + 4]
lea ecx, [ecx]
call fcn.0042ad50
cdq
mov ecx, edi
idiv ecx
mov dword [esp + esi*4 + 0x14], edx
cmp dword [esp + 0x14], edi
jge 0x4102f1
test bl, bl
je 0x4102f1
cmp esi, 4
jne 0x4102f1
mov dword [esp + 0x24], edi
xor eax, eax
test esi, esi
jle 0x41030b
mov ecx, dword [esp + esi*4 + 0x14]
jmp 0x410300
cmp ecx, dword [esp + eax*4 + 0x14]
je 0x4102d0
inc eax
cmp eax, esi
jl 0x410300
inc esi
cmp esi, edi
jl 0x4102d0
jmp case.default.0x410549
mov ebx, 5
mov dword [esp + 0x28], ebx
call fcn.0042ad50
cdq
mov ecx, 0xd
idiv ecx
mov esi, edx
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], 0
je 0x410351
call fcn.0042ad50
mov esi, eax
and esi, 0x80000003
jns 0x41034e
dec esi
or esi, 0xfffffffc
inc esi
add esi, 9
mov dword [esp + 0x38], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], esi
lea ecx, [ecx]
call fcn.0042ad50
cdq
mov ecx, 0xd
idiv ecx
cmp edx, esi
je 0x410360
mov dword [esp + 0x50], edx
mov dword [esp + 0x58], edx
call fcn.0042ad50
cdq
mov ecx, ebx
idiv ecx
mov dword [esp + 0x14], edx
call fcn.0042ad50
mov edi, eax
and edi, 0x80000003
jns 0x41039b
dec edi
or edi, 0xfffffffc
inc edi
cmp edi, 3
jne 0x4103a4
mov dword [esp + 0x14], ebx
mov edx, dword [esp + 0x10]
xor bl, bl
cmp byte [edx + 0x9f8], bl
jne 0x4103b4
mov bl, 1
mov esi, 1
lea esp, [esp]
cmp edi, 3
ja case.default.0x4103c9
jmp dword [edi*4 + 0x410c94]
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov dword [esp + esi*4 + 0x14], edx
test bl, bl
je case.default.0x4103c9
cmp esi, 1
jle case.default.0x4103c9
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], 0
jne case.default.0x4103c9
call fcn.0042ad50
cdq
mov ecx, 3
idiv ecx
add edx, 5
mov dword [esp + esi*4 + 0x14], edx
jmp case.default.0x4103c9
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov dword [esp + esi*4 + 0x14], edx
test bl, bl
je case.default.0x4103c9
cmp esi, 2
jne case.default.0x4103c9
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], 0
jne case.default.0x4103c9
mov dword [esp + 0x1c], ecx
jmp case.default.0x4103c9
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov dword [esp + esi*4 + 0x14], edx
test bl, bl
je case.default.0x4103c9
cmp esi, 2
jle case.default.0x4103c9
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], 0
jne case.default.0x4103c9
call fcn.0042ad50
and eax, 0x80000001
jns 0x410490
dec eax
or eax, 0xfffffffe
inc eax
add eax, 5
jmp 0x4104bf
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
mov dword [esp + esi*4 + 0x14], edx
test bl, bl
je case.default.0x4103c9
cmp esi, 2
jg case.default.0x4103c9
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x9f8], 0
jne case.default.0x4103c9
lea eax, [esi + 5]
mov dword [esp + esi*4 + 0x14], eax
xor eax, eax
test esi, esi
jle 0x4104df
mov ecx, dword [esp + esi*4 + 0x14]
lea ecx, [ecx]
cmp ecx, dword [esp + eax*4 + 0x14]
je 0x4103c0
inc eax
cmp eax, esi
jl 0x4104d0
inc esi
cmp esi, 5
jl 0x4103c0
jmp case.default.0x410549
mov dword [esp + 0x28], 4
call fcn.0042ad50
cdq
mov ecx, 9
idiv ecx
cmp esi, 0xc
jne 0x410517
call fcn.0042ad50
cdq
mov ecx, ebx
idiv ecx
add edx, 9
jmp 0x410521
cmp esi, 0xd
jne 0x410521
mov edx, 0xc
mov dword [esp + 0x38], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x50], edx
call fcn.0042ad50
mov ecx, 5
cdq
mov esi, ecx
idiv esi
cmp edx, 4
ja case.default.0x410549
jmp dword [edx*4 + 0x410ca4]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], 2
mov dword [esp + 0x20], ecx
jmp 0x410736
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 6
mov dword [esp + 0x20], 2
jmp 0x410736
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], 6
mov dword [esp + 0x20], 2
jmp case.default.0x410549
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 6
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edi
jmp case.default.0x410549
mov dword [esp + 0x20], 7
jmp 0x41072a
mov dword [esp + 0x28], 5
call fcn.0042ad50
cdq
mov ecx, 7
idiv ecx
mov edi, dword [ebp + 8]
mov esi, edx
inc esi
cmp edi, 0xf
jne 0x4105ed
xor esi, esi
jmp 0x4105fc
cmp edi, 0x10
je 0x4105f7
cmp edi, 0x11
jne 0x4105fc
mov esi, 8
call fcn.0042ad50
and eax, 0x80000003
jns 0x41060d
dec eax
or eax, 0xfffffffc
inc eax
mov dword [esp + 0x64], eax
cmp edi, 0x11
jne 0x41061e
mov eax, ebx
mov dword [esp + 0x64], eax
jmp 0x41063d
cmp edi, 0x10
jne 0x41063d
call fcn.0042ad50
and eax, 0x80000003
jns 0x410634
dec eax
or eax, 0xfffffffc
inc eax
mov dword [esp + 0x64], eax
cmp eax, 3
je 0x410623
lea edx, [esi + 1]
mov dword [esp + 0x40], edx
lea ecx, [esi + 2]
lea edx, [esi + 3]
mov dword [esp + 0x38], esi
add esi, 4
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], eax
cmp edi, 0xf
jne 0x410682
mov dword [esp + 0x58], 0xc
mov dword [esp + 0x54], eax
call fcn.0042ad50
cdq
mov ecx, 5
idiv ecx
cmp edx, 4
ja case.default.0x410549
jmp dword [edx*4 + 0x410cb8]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 2
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], ecx
jmp 0x410736
mov dword [esp + 0x14], 1
mov dword [esp + 0x20], 2
mov dword [esp + 0x24], 4
jmp 0x410732
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 2
mov dword [esp + 0x24], 4
jmp 0x410736
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 1
jmp case.default.0x410549
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 1
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
xor eax, eax
push 0x34
push eax
lea edx, [esp + 0xa0]
push edx
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
call fcn.00428f30
or eax, 0xffffffff
add esp, 0xc
cmp dword [ebp + 8], 0xe
mov dword [esp + 0x5c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x68], eax
jl 0x41079a
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x84], eax
mov dword [esp + 0x68], ecx
cmp dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
jle 0x410870
lea ebx, [esp + 0x34]
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
push edx
push eax
lea ecx, [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x1c]
call fcn.0040f7a0
mov esi, dword [eax]
cmp dword [esp + esi*4 + 0x74], 2
mov edi, dword [eax + 4]
jle 0x410800
mov eax, dword [ebp + 8]
cmp eax, 9
je 0x410800
cmp eax, 0xe
jge 0x410800
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
push edx
push eax
lea ecx, [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x1c]
call fcn.0040f7a0
mov esi, dword [eax]
cmp dword [esp + esi*4 + 0x74], 2
mov edi, dword [eax + 4]
jg 0x4107d2
mov eax, dword [esp + 0x5c]
cmp eax, 0xffffffff
jne 0x41080f
mov dword [esp + 0x5c], edi
jmp 0x410817
cmp eax, edi
je 0x410817
mov dword [esp + 0x30], edi
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + edx*4 + 0x14]
cdq
mov ecx, 5
idiv ecx
lea ecx, [edx + eax*4]
add ecx, eax
add ecx, ecx
add ecx, ecx
add ecx, ecx
mov dword [esp + ecx + 0x10c], edi
mov dword [esp + ecx + 0x108], esi
test eax, eax
jne 0x41085a
inc dword [esp + esi*4 + 0x74]
inc dword [esp + edi*4 + 0x98]
lea esi, [esp + esi*4 + 0x74]
lea edi, [esp + edi*4 + 0x98]
mov eax, dword [esp + 0x2c]
inc eax
add ebx, 8
cmp eax, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
jl 0x4107b1
xor esi, esi
mov dword [esp + 0x2c], esi
or eax, 0xffffffff
xor edx, edx
lea ecx, [esi + esi*4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x88]
add ecx, edx
add ecx, ecx
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x90], ecx
cmp dword [esp + ecx + 0x10c], eax
je 0x4108b5
cmp dword [esp + ecx + 0x108], eax
jne 0x410c3a
cmp dword [ebp + 8], 0xe
mov byte [esp + 0xe], 1
jge 0x4108e5
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x5c]
push edx
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x164]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.0040c210
mov edx, dword [eax]
mov dword [esp + 0x6c], edx
jmp 0x41090b
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x64]
push eax
push ecx
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x10c]
push eax
call fcn.0040c210
mov ecx, dword [eax]
mov dword [esp + 0x6c], ecx
cmp dword [esp + 0x2c], 0
mov ebx, dword [eax + 4]
mov dword [esp + 0x60], 0
jl 0x410a12
mov esi, dword [esp + 0x84]
mov edx, dword [esp + 0x68]
lea edi, [esp + 0x10c]
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 8]
test eax, eax
je 0x410952
cmp eax, 1
jne 0x4109cc
cmp dword [esp + 0x28], 2
jge 0x4109cc
cmp ecx, 0xf
je 0x4109af
cmp ecx, 0xe
jl 0x4109cc
cmp ebx, esi
jl 0x41096c
cmp ebx, edx
jle 0x410bcf
cmp byte [esp + 0xe], 0
je 0x410bcf
test esi, esi
jle 0x41098e
lea eax, [esi - 1]
cmp eax, ebx
je 0x410989
lea ecx, [esi - 2]
cmp ecx, ebx
jne 0x41098e
mov byte [esp + 0xe], 0
test edx, edx
jle 0x4109cc
cmp edx, 0xc
je 0x4109cc
lea eax, [edx + 1]
cmp eax, ebx
je 0x410bcf
lea ecx, [edx + 2]
cmp ecx, ebx
je 0x410bcf
jmp 0x4109cc
cmp byte [esp + 0xe], 0
je 0x410bcf
cmp ebx, 0xc
je 0x410bcf
cmp ebx, 5
jle 0x410bcf
cmp byte [esp + 0xe], 0
je 0x410bcf
xor eax, eax
mov ecx, edi
jmp 0x4109e0
cmp dword [ecx], ebx
je 0x410bcf
inc eax
add ecx, 8
cmp eax, 5
jl 0x4109e0
cmp byte [esp + 0xe], 0
je 0x410bcf
mov eax, dword [esp + 0x60]
inc eax
add edi, 0x28
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
jle 0x410933
cmp dword [esp + 0x2c], 0
mov eax, dword [ebp + 8]
jne 0x410bc8
cmp byte [esp + 0xf], 0
je 0x410a32
cmp ebx, dword [esp + 0x5c]
jle 0x410a32
mov byte [esp + 0xe], 0
mov edx, dword [esp + 0x6c]
cmp dword [esp + edx*4 + 0x74], 2
jl 0x410a4c
cmp eax, 9
je 0x410a4c
cmp eax, 0xe
jge 0x410a4c
mov byte [esp + 0xe], 0
cmp eax, 6
jl 0x410ad0
cmp eax, 9
jl 0x410a63
cmp eax, 0xe
jl 0x410ad0
cmp eax, 8
jg 0x410ab9
mov edx, dword [esp + 0x58]
inc edx
cmp eax, 7
jne 0x410a77
mov edx, dword [esp + 0x50]
inc edx
mov ecx, dword [esp + 0x38]
lea eax, [ecx - 1]
add ecx, 0xfffffffe
test eax, eax
jge 0x410a8a
mov eax, 0xc
test ecx, ecx
jge 0x410a93
mov ecx, 0xc
cmp ebx, edx
je 0x410bcf
inc edx
cmp ebx, edx
je 0x410bcf
cmp ebx, eax
je 0x410bcf
cmp ebx, ecx
jne 0x410bc8
jmp 0x410bcf
cmp eax, 0xe
jne 0x410bc8
cmp ebx, 0xc
jne 0x410bc8
jmp 0x410bcf
mov edx, 1
xor eax, eax
test eax, eax
jle 0x410b17
mov ecx, dword [esp + eax*4 + 0x94]
mov esi, 1
cmp ecx, esi
jl 0x410af8
cmp dword [esp + eax*4 + 0x98], esi
jge 0x410b15
cmp ebx, eax
je 0x410b15
cmp dword [esp + eax*4 + 0x98], esi
jl 0x410b0c
cmp ecx, esi
jge 0x410b15
lea ecx, [eax - 1]
cmp ebx, ecx
je 0x410b15
cmp edx, 5
jge 0x410b17
mov edx, esi
jmp 0x410b20
add edx, esi
cmp edx, 3
jge 0x410bcf
inc eax
cmp eax, 0xd
jl 0x410ad7
cmp byte [esp + 0xe], 0
je 0x410bcf
mov ecx, 1
lea edx, [esp + 0xc8]
inc dword [esp + ebx*4 + 0x98]
mov edi, dword [esp + ebx*4 + 0x98]
lea esi, [ecx - 2]
xor eax, eax
test esi, esi
jl 0x410b59
cmp dword [edx - 0x34], eax
jmp 0x410b5c
cmp dword [edx], 0
jle 0x410b63
mov eax, 1
lea esi, [ecx - 1]
test esi, esi
jl 0x410b70
cmp dword [edx - 0x30], 0
jmp 0x410b73
cmp dword [edx], 0
jle 0x410b76
inc eax
test ecx, ecx
jl 0x410b80
cmp dword [edx - 0x2c], 0
jmp 0x410b83
cmp dword [edx], 0
jle 0x410b86
inc eax
lea esi, [ecx + 1]
test esi, esi
jl 0x410b93
cmp dword [edx - 0x28], 0
jmp 0x410b96
cmp dword [edx], 0
jle 0x410b99
inc eax
add ecx, 2
js 0x410ba4
cmp dword [edx - 0x24], 0
jmp 0x410ba7
cmp dword [edx], 0
jle 0x410baa
inc eax
dec edi
cmp eax, 4
mov dword [esp + ebx*4 + 0x98], edi
jge 0x410bcf
mov ecx, esi
lea eax, [ecx - 2]
add edx, 4
cmp eax, 9
jl 0x410b3d
cmp byte [esp + 0xe], 0
jne 0x410bfc
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x6e0]
cmp eax, 0xa
jl 0x410bf1
cmp dword [ebp + 8], 0xe
jl 0x4108b5
cmp eax, 0xf
jg 0x4108b5
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [esp + 0x2c], 0
jne 0x410c16
mov eax, dword [esp + 0x6c]
inc dword [esp + ebx*4 + 0x98]
inc dword [esp + eax*4 + 0x74]
lea eax, [esp + eax*4 + 0x74]
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x6c]
mov esi, dword [esp + 0x2c]
mov dword [esp + eax + 0x108], edx
mov edx, dword [esp + 0x28]
mov dword [esp + eax + 0x10c], ebx
or eax, 0xffffffff
inc edx
cmp edx, 5
mov dword [esp + 0x28], edx
jl 0x410889
inc esi
cmp esi, 2
mov dword [esp + 0x2c], esi
jl 0x410879
jmp 0x40fda1