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

Disassembly:
sub esp, 0x314
mov eax, dword [0x418cbc]
mov edx, dword [0x4147dc]
mov dword [esp + 0x310], eax
push ebx
mov ebx, ecx
xor eax, eax
push ebp
push esi
xor esi, esi
push edi
mov word [esp + 0x260], si
mov dword [esp + 0x262], esi
mov ecx, 0x2e
lea edi, [esp + 0x266]
rep stosd dword es:[edi], eax
xor ecx, ecx
stosw word es:[edi], ax
mov dword [esp + 0x1a6], ecx
xor eax, eax
mov dword [esp + 0x1aa], ecx
mov dword [esp + 0x192], eax
mov dword [esp + 0x1ae], ecx
mov dword [esp + 0x196], eax
mov dword [esp + 0x1b2], ecx
mov dword [esp + 0x19a], eax
mov dword [esp + 0x1b6], ecx
mov dword [esp + 0x19e], eax
mov dword [esp + 0x1ba], ecx
mov word [esp + 0x1a2], ax
mov eax, dword [0x4147e0]
mov dword [esp + 0x1be], ecx
mov word [esp + 0x1c2], cx
mov ecx, dword [0x4147e4]
mov dword [esp + 0x1c4], edx
mov edx, dword [0x4147e8]
mov dword [esp + 0x1c8], eax
mov eax, dword [0x4147cc]
mov dword [esp + 0x1cc], ecx
mov ecx, dword [0x4147d0]
mov dword [esp + 0x1d0], edx
mov edx, dword [0x4147d4]
mov dword [esp + 0x1d8], eax
mov eax, dword [0x4147d8]
mov word [esp + 0x190], si
mov word [esp + 0x1a4], si
mov word [esp + 0x1d4], si
mov dword [esp + 0x1dc], ecx
mov dword [esp + 0x1e0], edx
mov dword [esp + 0x1e4], eax
mov word [esp + 0x1e8], si
call dword [0x4141c0]
mov dword [esp + 0x7c], eax
and eax, 0x3ff
cmp ax, 4
mov dword [esp + 0x64], eax
je 0x40bcaa
cmp ax, 0x11
je 0x40bcaa
cmp ax, 0x12
mov dword [esp + 0x2c], esi
jne 0x40bcb2
mov dword [esp + 0x2c], 1
mov edi, dword [esp + 0x328]
mov ebp, dword [0x41431c]
push edi
call ebp
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.00405850
lea edx, [esp + 0x70]
push edx
call fcn.00405640
add esp, 0xc
test eax, eax
jne 0x40bd15
lea eax, [esp + 0x220]
push eax
push edi
call dword [0x4142f0]
lea ecx, [esp + 0x220]
push ecx
push edi
call dword [0x41430c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x310]
call fcn.0040c9bf
add esp, 0x314
ret
lea edx, [esp + 0x68]
push edx
call dword [0x4141c4]
call fcn.0040b560
movsx esi, word [0x419a16]
mov ecx, esi
mov dword [esp + 0x24], eax
call fcn.0040b5b0
mov dword [esp + 0x80], eax
mov eax, 0x20
mov word [esp + 0x184], ax
mov word [esp + 0x186], ax
mov word [esp + 0x18a], ax
mov word [esp + 0x18c], ax
mov word [esp + 0x18e], ax
lea eax, [esp + 0x190]
push eax
lea ecx, [esp + 0x108]
push ecx
movsx ecx, word [0x419a18]
lea edx, [esp + 0x8c]
push edx
movsx edx, word [0x419a1a]
lea eax, [esp + 0x26c]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x2c], 1
mov word [esp + 0x1a4], 0x30
call fcn.00402330
add esp, 0x1c
push 0x3ed
push edi
call ebp
push eax
call dword [0x4142a0]
mov esi, eax
mov eax, dword [0x419470]
test eax, eax
lea eax, [esp + 0x1d8]
jne 0x40bdde
lea eax, [esp + 0x1c4]
lea ecx, [esp + 0x190]
push ecx
push eax
lea edx, [esp + 0x1ac]
push 0x10
push edx
call fcn.00405700
add esp, 0x10
lea eax, [esp + 0x1a4]
push eax
push esi
call dword [0x414270]
call fcn.0040b500
lea ecx, [esp + 0x220]
push ecx
push edi
mov dword [esp + 0x54], eax
call dword [0x4142f0]
lea edx, [esp + 0x54]
push edx
push edi
mov esi, eax
call dword [0x414310]
mov ebp, dword [0x4142f4]
push 5
call ebp
push eax
lea eax, [esp + 0x58]
push eax
push esi
call dword [0x4142f8]
mov ecx, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x1c], edx
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 + 0x1c], edi
mov dword [esp + 0x24], eax
call ebp
push eax
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [0x4142f8]
mov ebp, dword [0x4142fc]
push 5
call ebp
push eax
push esi
call dword [0x41405c]
mov edx, dword [ebx + 4]
push edx
push esi
call dword [0x414078]
push 8
call ebp
push eax
push esi
call dword [0x414058]
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x40bf10
mov edi, dword [0x414300]
push 0x400
lea eax, [esp + 0x18]
push eax
push 1
push 0x4147c8
push esi
call edi
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
sub ecx, edx
mov edx, dword [esp + 0x20]
push 0x400
sub edx, eax
lea eax, [esp + 0x18]
push eax
push 1
push 0x414364
push esi
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], edx
call edi
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x14]
mov dword [ebx + 0xc], ecx
mov edi, dword [0x414038]
mov dword [esp + 0x28], 1
mov edi, edi
mov eax, dword [esp + 0x24]
cmp eax, 7
mov dword [esp + 0x50], eax
jge 0x40c30e
mov edx, dword [esp + 0x4c]
add edx, eax
mov eax, dword [esp + 0x10]
lea ecx, [eax + eax*2]
mov dword [esp + 0x48], edx
lea edx, [esp + ecx*2 + 0x260]
mov dword [esp + 0x30], edx
jmp 0x40bf53
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x80]
jg 0x40c30e
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x5c]
sub ecx, edx
imul ecx, dword [esp + 0x50]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 5]
mov edx, dword [esp + 0x58]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x60]
sub ecx, edx
imul ecx, dword [esp + 0x28]
mov eax, 0x92492493
imul ecx
add edx, ecx
mov ecx, dword [ebx + 0x10]
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea edx, [edx + eax + 2]
mov eax, dword [esp + 0x14]
lea ecx, [eax + ecx*2]
mov eax, dword [ebx + 0x14]
add eax, edx
cmp word [esp + 0x188], 0x39
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
jne 0x40bffd
cmp word [esp + 0x186], 0x20
mov word [esp + 0x188], 0x30
jne 0x40bff3
mov word [esp + 0x186], 0x31
jmp 0x40c005
inc word [esp + 0x186]
jmp 0x40c005
inc word [esp + 0x188]
push esi
call dword [0x414048]
movsx ecx, word [0x419a18]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
cmp ecx, eax
jne 0x40c0b2
push esi
call dword [0x414054]
push 2
mov dword [esp + 0x38], eax
call ebp
push eax
push esi
call dword [0x41405c]
push esi
call dword [0x414048]
push 9
mov dword [esp + 0x28], eax
call ebp
push eax
push esi
call dword [0x414058]
mov ecx, dword [esp + 0x18]
push 0
push 5
lea edx, [esp + 0x18c]
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push eax
push 4
dec ecx
push ecx
push edx
push esi
call edi
mov edx, dword [ebx + 0x14]
add edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push 0
push 2
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x38]
push edx
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x44]
push edx
push 4
add ecx, 0xfffffffe
push ecx
push eax
push esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ecx
call edi
jmp 0x40c265
movzx ecx, word [esp + 0x68]
movsx edx, word [0x419a1a]
cmp edx, ecx
jne 0x40c17a
movzx ecx, word [esp + 0x6a]
movsx edx, word [0x419a16]
cmp edx, ecx
jne 0x40c17a
movzx ecx, word [esp + 0x6e]
cmp eax, ecx
jne 0x40c17a
push esi
call dword [0x414054]
push 0x11
mov dword [esp + 0x38], eax
call ebp
push eax
push esi
call dword [0x41405c]
push esi
call dword [0x414048]
push 9
mov dword [esp + 0x28], eax
call ebp
push eax
push esi
call dword [0x414058]
mov ecx, dword [esp + 0x18]
push 0
push 5
lea edx, [esp + 0x18c]
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push eax
push 4
dec ecx
push ecx
push edx
push esi
call edi
mov ecx, dword [esp + 0x1c]
mov ebp, dword [ebx + 0x14]
mov eax, dword [esp + 0x14]
push 0
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x24]
push 2
lea edx, [ecx - 2]
add ebp, ecx
mov ecx, dword [esp + 0x38]
push ecx
lea ecx, [esp + 0x44]
push ecx
push 4
push edx
push eax
push esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x64], ebp
call edi
mov ebp, dword [0x4142fc]
jmp 0x40c265
mov eax, dword [esp + 0x48]
cdq
mov ecx, 7
idiv ecx
cmp edx, 5
mov dword [esp + 0x78], edx
je 0x40c1aa
cmp edx, 6
je 0x40c1aa
mov edx, dword [esp + 0x10]
mov eax, dword [esp + edx*4 + 0x84]
test eax, eax
jne 0x40c1aa
push 8
call ebp
push eax
jmp 0x40c1af
push 0xff
push esi
call dword [0x414058]
mov edx, dword [esp + 0x18]
push 0
push 5
lea eax, [esp + 0x18c]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x20]
push ecx
push 4
push edx
push eax
push esi
call edi
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], edx
mov edx, dword [ebx + 0x14]
add edx, eax
mov dword [esp + 0x38], ecx
lea ecx, [eax - 2]
mov eax, dword [esp + 0x78]
cmp eax, 5
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x44], edx
je 0x40c230
cmp eax, 6
je 0x40c230
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + eax*4 + 0x84]
test ecx, ecx
jne 0x40c230
mov ecx, dword [esp + eax*4 + 0x104]
test ecx, ecx
je 0x40c229
push 0x8000
jmp 0x40c235
push 0xa00000
jmp 0x40c235
push 0xff
push esi
call dword [0x414058]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x3c]
push 0
push 2
push eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x44]
push ecx
push 4
push edx
push eax
push esi
call edi
mov ecx, dword [esp + 0x24]
push ecx
push esi
call dword [0x414058]
movzx edx, word [esp + 0x68]
movsx eax, word [0x419a1a]
cmp eax, edx
jne 0x40c290
movzx ecx, word [esp + 0x6a]
movsx edx, word [0x419a16]
cmp edx, ecx
jne 0x40c290
movzx eax, word [esp + 0x6e]
cmp dword [esp + 0x10], eax
je 0x40c29d
movsx ecx, word [0x419a18]
cmp ecx, dword [esp + 0x10]
jne 0x40c2d7
mov eax, dword [ebx + 8]
test eax, eax
je 0x40c2bf
mov edx, dword [ebx + 0x14]
mov eax, dword [esp + 0x18]
lea ecx, [eax + edx*2 - 2]
lea edx, [esp + 0x14]
push edx
push esi
mov dword [esp + 0x28], ecx
call dword [0x414304]
mov eax, dword [esp + 0x34]
push eax
push esi
call dword [0x41405c]
mov ecx, dword [esp + 0x24]
push ecx
push esi
call dword [0x414058]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
inc eax
add edx, 6
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x48]
inc eax
inc edx
cmp eax, 7
mov dword [esp + 0x24], 0
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], edx
jl 0x40bf4f
mov eax, dword [esp + 0x28]
inc eax
cmp eax, 7
mov dword [esp + 0x28], eax
jl 0x40bf20
push 3
call ebp
push eax
push esi
call dword [0x41405c]
push 0x13
mov dword [esp + 0x38], eax
call ebp
push eax
push esi
call dword [0x414058]
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x40c421
mov eax, dword [esp + 0x64]
cmp ax, 1
je 0x40c360
cmp ax, 0x5a
mov dword [esp + 0x2c], 0x400
jne 0x40c368
mov dword [esp + 0x2c], 0x409
mov edx, dword [esp + 0x4c]
xor edi, edi
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x28]
cdq
mov ecx, 7
idiv ecx
mov ecx, dword [esp + 0x2c]
push 0x19
mov ebx, edx
lea edx, [esp + 0x1f0]
push edx
lea eax, [ebx + 0x31]
push eax
push ecx
call dword [0x4141dc]
mov ax, word [esp + 0x1ec]
test ax, ax
je 0x40c3b8
movzx edx, ax
push edx
call dword [0x414308]
mov word [esp + 0x1ec], ax
cmp ebx, 5
je 0x40c3c9
cmp ebx, 6
je 0x40c3c9
push 0x13
call ebp
push eax
jmp 0x40c3ce
push 0xff
push esi
call dword [0x414058]
mov ecx, dword [esp + 0x5c]
push 1
lea eax, [esp + 0x1f0]
push eax
sub ecx, dword [esp + 0x5c]
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]
mov ecx, dword [esp + 0x28]
inc edi
inc ecx
cmp edi, 7
mov dword [esp + 0x28], ecx
jl 0x40c372
jmp 0x40c52d
xor ebx, ebx
mov eax, dword [esp + 0x4c]
add eax, ebx
cdq
mov ecx, 7
idiv ecx
push 0x19
mov edi, edx
lea edx, [esp + 0x1f0]
push edx
lea eax, [edi + 0x31]
push eax
push 0x400
call dword [0x4141dc]
mov ax, word [esp + 0x1ec]
test ax, ax
je 0x40c46b
movzx ecx, ax
push ecx
call dword [0x414308]
mov word [esp + 0x1ec], ax
cmp edi, 5
je 0x40c47c
cmp edi, 6
je 0x40c47c
push 0x13
call ebp
push eax
jmp 0x40c481
push 0xff
push esi
call dword [0x414058]
cmp word [esp + 0x64], 4
jne 0x40c4e2
lea edx, [esp + 0x1ec]
push edx
call dword [0x4141d0]
cmp eax, 3
jne 0x40c4e2
cmp word [esp + 0x7c], 0xc04
lea eax, [esp + 0x1ec]
je 0x40c4ba
lea eax, [esp + 0x1f0]
mov ecx, dword [esp + 0x5c]
push 1
push eax
sub ecx, dword [esp + 0x5c]
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 0x40c51c
lea edx, [esp + 0x1ec]
push edx
call dword [0x4141d0]
mov ecx, dword [esp + 0x5c]
push eax
lea eax, [esp + 0x1f0]
push eax
sub ecx, dword [esp + 0x5c]
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 0x40c423
mov eax, dword [esp + 0x34]
push eax
push esi
call dword [0x41405c]
mov edx, dword [esp + 0x328]
lea ecx, [esp + 0x220]
push ecx
push edx
call dword [0x41430c]
mov ecx, dword [esp + 0x320]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
call fcn.0040c9bf
add esp, 0x314
ret