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

Disassembly:
sub esp, 0xdc
mov eax, dword [0x418cbc]
mov dword [esp + 0xd8], eax
call dword [0x4141c0]
mov dword [esp + 0x38], eax
and eax, 0x3ff
cmp ax, 4
mov dword [esp + 0x28], eax
je 0x40142f
cmp ax, 0x11
je 0x40142f
cmp ax, 0x12
mov dword [esp + 0x10], 0
jne 0x401437
mov dword [esp + 0x10], 1
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x4c]
push eax
call dword [0x4141c4]
call fcn.00401060
call entry0
inc eax
cdq
mov ecx, 7
idiv ecx
movsx eax, word [0x419a1c]
mov esi, 7
sub eax, edx
add eax, ecx
cdq
idiv ecx
movsx eax, word [0x419a18]
mov ecx, edx
cdq
idiv esi
sub ecx, edx
add ecx, 8
mov eax, ecx
cdq
mov ecx, esi
idiv ecx
mov dword [esp + 0x40], edx
movsx edx, word [0x419a16]
push edx
call fcn.00401130
mov edi, dword [esp + 0xf8]
add esp, 4
mov dword [esp + 0x44], eax
lea eax, [esp + 0xa8]
push eax
push edi
mov dword [esp + 0x38], 1
mov word [esp + 0x64], 0x20
mov word [esp + 0x66], 0x30
call dword [0x4142f0]
lea ecx, [esp + 0x64]
push ecx
push edi
mov esi, eax
call dword [0x414310]
mov ebx, dword [0x4142f4]
push 5
call ebx
mov ebp, dword [0x4142f8]
push eax
lea edx, [esp + 0x68]
push edx
push esi
call ebp
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x70]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, edi
push 3
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
call ebx
push eax
lea ecx, [esp + 0x14]
push ecx
push esi
call ebp
mov ebp, dword [0x4142fc]
push 5
call ebp
push eax
push esi
call dword [0x41405c]
mov edi, dword [esp + 0xf0]
mov edx, dword [edi + 4]
push edx
push esi
call dword [0x414078]
push 8
call ebp
mov ebx, dword [0x414058]
push eax
push esi
call ebx
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x4015c1
push 0x400
lea eax, [esp + 0x14]
push eax
push 1
push 0x414368
push esi
call dword [0x414300]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esp + 0x1c]
push 0x400
sub edx, eax
lea eax, [esp + 0x14]
push eax
push 1
push 0x414364
push esi
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], edx
call dword [0x414300]
mov ecx, dword [esp + 0x18]
sub ecx, dword [esp + 0x10]
mov dword [edi + 0xc], ecx
call entry0
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], 1
mov eax, dword [esp + 0x40]
cmp eax, 7
mov dword [esp + 0x28], eax
jge 0x40180b
jmp 0x4015f0
mov edx, dword [esp + 0x30]
cmp edx, dword [esp + 0x44]
jg 0x40180b
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x6c]
sub ecx, eax
imul ecx, dword [esp + 0x28]
mov eax, 0x92492493
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x70]
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea edi, [edx + eax + 5]
sub ecx, dword [esp + 0x68]
imul ecx, dword [esp + 0x2c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 3]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
add edi, 0x14
add eax, 0x14
cmp word [esp + 0x5e], 0x39
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
jne 0x401681
cmp word [esp + 0x5c], 0x20
mov word [esp + 0x5e], 0x30
jne 0x40167a
mov word [esp + 0x5c], 0x31
jmp 0x401686
inc word [esp + 0x5c]
jmp 0x401686
inc word [esp + 0x5e]
movsx edx, word [0x419a18]
mov edi, dword [esp + 0x30]
cmp edx, edi
jne 0x4016be
push esi
call dword [0x414054]
push 2
mov dword [esp + 0x28], eax
call ebp
push eax
push esi
call dword [0x41405c]
push esi
call dword [0x414048]
push 9
mov dword [esp + 0x40], eax
call ebp
push eax
jmp 0x401738
movzx eax, word [esp + 0x4c]
movsx ecx, word [0x419a1a]
cmp ecx, eax
jne 0x401710
movzx edx, word [esp + 0x4e]
movsx eax, word [0x419a16]
cmp eax, edx
jne 0x401710
movzx ecx, word [esp + 0x52]
cmp edi, ecx
jne 0x401710
push esi
call dword [0x414054]
push 0x11
mov dword [esp + 0x28], eax
call ebp
push eax
push esi
call dword [0x41405c]
push esi
call dword [0x414048]
push 9
mov dword [esp + 0x40], eax
call ebp
push eax
jmp 0x401738
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
add eax, edx
cdq
mov ecx, 7
idiv ecx
cmp edx, 5
je 0x401733
cmp edx, 6
je 0x401733
push 8
call ebp
push eax
jmp 0x401738
push 0xff
push esi
call ebx
mov ecx, dword [esp + 0x14]
push 0
push 2
lea edx, [esp + 0x64]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
push esi
call dword [0x414038]
movzx eax, word [esp + 0x4c]
movsx ecx, word [0x419a1a]
cmp ecx, eax
jne 0x401785
movzx edx, word [esp + 0x4e]
movsx eax, word [0x419a16]
cmp eax, edx
jne 0x401785
movzx ecx, word [esp + 0x52]
cmp edi, ecx
je 0x401790
movsx edx, word [0x419a18]
cmp edx, edi
jne 0x4017ec
mov eax, dword [esp + 0xf0]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x4017d8
mov ecx, dword [eax + 0x14]
add ecx, dword [esp + 0x14]
cmp edi, 9
mov dword [esp + 0x1c], ecx
jg 0x4017be
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 0x10]
mov eax, dword [esp + 0x10]
add edx, ecx
add edx, eax
jmp 0x4017c8
mov eax, dword [eax + 0x10]
mov ecx, dword [esp + 0x10]
lea edx, [ecx + eax*2]
lea eax, [esp + 0x10]
push eax
push esi
mov dword [esp + 0x20], edx
call dword [0x414304]
mov ecx, dword [esp + 0x24]
push ecx
push esi
call dword [0x41405c]
mov edx, dword [esp + 0x3c]
push edx
push esi
call ebx
mov eax, dword [esp + 0x28]
inc edi
inc eax
cmp eax, 7
mov dword [esp + 0x40], 0
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], eax
jl 0x4015f0
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, 7
mov dword [esp + 0x2c], eax
jl 0x4015d2
push 3
call ebp
push eax
push esi
call dword [0x41405c]
push 0x13
mov dword [esp + 0x28], eax
call ebp
push eax
push esi
call ebx
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x401904
mov eax, dword [esp + 0x38]
cmp ax, 1
je 0x401859
cmp ax, 0x5a
mov dword [esp + 0x20], 0x400
jne 0x401861
mov dword [esp + 0x20], 0x409
mov ebp, dword [esp + 0x34]
xor edi, edi
mov eax, ebp
cdq
mov ecx, 7
idiv ecx
mov ecx, dword [esp + 0x20]
push 0x19
mov ebx, edx
lea edx, [esp + 0x78]
push edx
lea eax, [ebx + 0x31]
push eax
push ecx
call dword [0x4141dc]
mov ax, word [esp + 0x74]
test ax, ax
je 0x4018a2
movzx edx, ax
push edx
call dword [0x414308]
mov word [esp + 0x74], ax
cmp ebx, 5
je 0x4018b7
cmp ebx, 6
je 0x4018b7
push 0x13
call dword [0x4142fc]
push eax
jmp 0x4018bc
push 0xff
push esi
call dword [0x414058]
mov ecx, dword [esp + 0x6c]
push 1
lea eax, [esp + 0x78]
push eax
sub ecx, dword [esp + 0x6c]
imul ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
push 3
lea edx, [edx + ecx + 5]
push edx
push esi
call dword [0x414050]
inc edi
inc ebp
cmp edi, 7
jl 0x401867
jmp 0x4019f8
xor ebx, ebx
mov eax, dword [esp + 0x34]
add eax, ebx
cdq
mov ecx, 7
idiv ecx
push 0x19
mov edi, edx
lea edx, [esp + 0x78]
push edx
lea eax, [edi + 0x31]
push eax
push 0x400
call dword [0x4141dc]
mov ax, word [esp + 0x74]
test ax, ax
je 0x401945
movzx ecx, ax
push ecx
call dword [0x414308]
mov word [esp + 0x74], ax
cmp edi, 5
je 0x401956
cmp edi, 6
je 0x401956
push 0x13
call ebp
push eax
jmp 0x40195b
push 0xff
push esi
call dword [0x414058]
cmp word [esp + 0x38], 4
jne 0x4019b3
lea edx, [esp + 0x74]
push edx
call dword [0x4141d0]
cmp eax, 3
jne 0x4019b3
cmp word [esp + 0x48], 0xc04
lea eax, [esp + 0x74]
je 0x40198b
lea eax, [esp + 0x78]
mov ecx, dword [esp + 0x6c]
push 1
push eax
sub ecx, dword [esp + 0x6c]
imul ecx, ebx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
push 3
lea ecx, [edx + eax + 5]
push ecx
jmp 0x4019e7
lea edx, [esp + 0x74]
push edx
call dword [0x4141d0]
mov ecx, dword [esp + 0x6c]
push eax
lea eax, [esp + 0x78]
push eax
sub ecx, dword [esp + 0x6c]
imul ecx, ebx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
push 3
lea edx, [edx + ecx + 5]
push edx
push esi
call dword [0x414050]
inc ebx
cmp ebx, 7
jl 0x401906
mov eax, dword [esp + 0x24]
push eax
push esi
call dword [0x41405c]
mov edx, dword [esp + 0xf4]
lea ecx, [esp + 0xa8]
push ecx
push edx
call dword [0x41430c]
mov ecx, dword [esp + 0xe8]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
call fcn.0040c9bf
add esp, 0xdc
ret