Function at 0x4b16c0
Capabilities:
Create thread
Terminate thread

Disassembly:
push 0xffffffffffffffff
push 0x64d89b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x290
mov eax, dword [esp + 0x2a0]
push ebx
mov ebx, 0x72a328
cmp eax, 1
mov dword [esp + 8], ebx
jne 0x4b16f8
mov ebx, 0x71acf8
jmp 0x4b171a
cmp eax, 2
jne 0x4b1704
mov ebx, 0x70b6c8
jmp 0x4b171a
cmp eax, 3
jne 0x4b1710
mov ebx, 0x722810
jmp 0x4b171a
cmp eax, 4
jne 0x4b171e
mov ebx, 0x703bb0
mov dword [esp + 8], ebx
movsx eax, word [ebx]
push ebp
push esi
shl eax, 1
push edi
push eax
call fcn.00643b70
movsx ecx, word [ebx]
shl ecx, 1
mov edx, ecx
mov edi, eax
xor eax, eax
mov dword [esp + 0x3c], edi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor esi, esi
and ecx, 3
add esp, 4
rep stosb byte es:[edi], al
mov ecx, 0x95
xor eax, eax
cmp word [ebx], si
lea edi, [esp + 0x4c]
mov dword [esp + 0x48], esi
rep stosd dword es:[edi], eax
jle 0x4b1806
mov ebx, dword [fcn.0065e1c8]
lea edi, [esp + 0x48]
mov ebp, 0x6e7dbc
mov eax, dword [esp + 0x2b0]
mov dword [ebp], 0xffffffff
cmp eax, 3
jne 0x4b1797
lea eax, [esp + 0x3c]
push eax
push 0
push esi
push 0x4b1580
jmp 0x4b17e0
cmp eax, 2
jne 0x4b17ab
lea ecx, [esp + 0x3c]
push ecx
push 0
push esi
push 0x4b1600
jmp 0x4b17e0
cmp eax, 1
jne 0x4b17bf
lea edx, [esp + 0x3c]
push edx
push 0
push esi
push 0x4b15c0
jmp 0x4b17e0
cmp eax, 4
jne 0x4b17d3
lea eax, [esp + 0x3c]
push eax
push 0
push esi
push 0x4b1640
jmp 0x4b17e0
lea ecx, [esp + 0x3c]
push ecx
push 0
push esi
push 0x4b1540
push 0
push 0
call ebx
push 1
mov dword [edi], eax
call dword [fcn.0065e26c]
mov edx, dword [esp + 0x14]
inc esi
add ebp, 0x10
add edi, 4
movsx eax, word [edx]
cmp esi, eax
jl 0x4b1775
mov cl, byte [esp + 0x47]
xor ebx, ebx
mov byte [esp + 0x1c], cl
xor ecx, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov ebp, dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0x2a8], ecx
cmp word [ebp], cx
jle 0x4b185b
lea esi, [esp + 0x48]
cmp dword [esi], 0
je 0x4b184f
push esi
push 1
push ecx
lea ecx, [esp + 0x28]
call fcn.004b2240
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
movsx edx, word [ebp]
inc edi
add esi, 4
cmp edi, edx
jl 0x4b1835
movsx eax, word [ebp]
inc eax
mov dword [esp + 0x18], 0
cdq
sub eax, edx
mov dword [esp + 0x30], 5
sar eax, 1
cmp eax, 5
jg 0x4b187e
mov dword [esp + 0x30], eax
test ebx, ebx
je 0x4b1b66
sub ecx, ebx
sar ecx, 2
je 0x4b1b66
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
cmp eax, edx
jge 0x4b1b66
push 0x1770
push 0
push ebx
push ecx
call dword [0x65e1c4]
cmp eax, 0x102
je 0x4b1b62
movsx ecx, word [ebp]
dec ecx
cmp eax, ecx
ja 0x4b1b62
mov ebx, dword [esp + 0x20]
xor esi, esi
lea ecx, [esp + 0x48]
mov eax, dword [ebx + eax*4]
test eax, eax
je 0x4b18dd
cmp eax, dword [ecx]
je 0x4b18f8
inc esi
add ecx, 4
cmp esi, 0x96
jl 0x4b18d5
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
inc eax
mov dword [esp + 0x18], eax
jmp 0x4b187e
test esi, esi
jge 0x4b190e
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
inc eax
mov dword [esp + 0x18], eax
jmp 0x4b187e
mov eax, dword [esp + esi*4 + 0x48]
lea edi, [esp + esi*4 + 0x48]
lea edx, [esp + 0x40]
push edx
push eax
call dword [0x65e1c0]
test eax, eax
je 0x4b1b51
mov eax, dword [esp + 0x40]
cmp eax, 0x103
je 0x4b1b51
cmp eax, 1
jne 0x4b1959
mov ecx, esi
shl ecx, 4
mov eax, dword [ecx + 0x6e7dbc]
test eax, eax
jl 0x4b1959
mov edx, dword [esp + 0x38]
mov word [edx + esi*2], 1
jmp 0x4b1963
mov eax, dword [esp + 0x38]
mov word [eax + esi*2], 0
mov ecx, dword [edi]
push ecx
call dword [0x65e18c]
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
cmp eax, eax
mov dword [edi], 0
mov edx, eax
mov ecx, ebx
je 0x4b1994
mov esi, dword [eax]
add eax, 4
mov dword [ecx], esi
add ecx, 4
cmp eax, edx
jne 0x4b1982
mov ebx, dword [esp + 0x20]
cmp word [ebp], 0
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], 0
jle 0x4b1b59
lea edi, [esp + 0x48]
mov dword [esp + 0x2c], edi
cmp dword [edi], 0
je 0x4b1b2c
mov edx, dword [esp + 0x28]
mov esi, ecx
sub edx, ecx
sar edx, 2
cmp edx, 1
jae 0x4b1a88
test ebx, ebx
je 0x4b19e0
mov eax, ecx
sub eax, ebx
sar eax, 2
cmp eax, 1
ja 0x4b19e5
mov eax, 1
test ebx, ebx
jne 0x4b19ed
xor ecx, ecx
jmp 0x4b19f2
sub ecx, ebx
sar ecx, 2
add eax, ecx
test eax, eax
mov dword [esp + 0x10], eax
jge 0x4b19fe
xor eax, eax
shl eax, 2
push eax
call fcn.00643b70
mov ebx, dword [esp + 0x24]
add esp, 4
mov ebp, eax
cmp ebx, esi
mov edi, ebp
je 0x4b1a2a
push ebx
push edi
call fcn.004946b0
add ebx, 4
add esp, 8
add edi, 4
cmp ebx, esi
jne 0x4b1a16
mov ecx, dword [esp + 0x2c]
push ecx
push edi
call fcn.004946b0
mov edx, dword [esp + 0x2c]
add esp, 8
add edi, 4
lea ecx, [esp + 0x1c]
push edi
push edx
push esi
call fcn.004b2450
mov eax, dword [esp + 0x20]
push eax
call fcn.00643cfc
mov ecx, dword [esp + 0x14]
add esp, 4
lea edx, [ebp + ecx*4]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28], edx
call fcn.004b2220
mov edi, dword [esp + 0x2c]
lea ecx, [ebp + eax*4 + 4]
mov ebx, ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ebx
jmp 0x4b1b2c
xor eax, eax
mov dword [esp + 0x10], eax
sar eax, 2
cmp eax, 1
jae 0x4b1ada
lea eax, [ecx + 4]
push eax
push ecx
push ecx
lea ecx, [esp + 0x28]
call fcn.004b2450
mov eax, dword [esp + 0x24]
mov edx, 1
mov ecx, eax
push edi
sub ecx, esi
sar ecx, 2
sub edx, ecx
lea ecx, [esp + 0x20]
push edx
push eax
call fcn.004b2480
mov ecx, dword [esp + 0x24]
mov eax, esi
cmp esi, ecx
je 0x4b1b21
mov edx, dword [edi]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x4b1acd
jmp 0x4b1b1d
lea eax, [ecx - 4]
push ecx
push ecx
push eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], eax
call fcn.004b2450
mov ecx, dword [esp + 0x24]
lea eax, [ecx - 4]
cmp esi, eax
je 0x4b1b0b
mov edx, dword [eax - 4]
sub eax, 4
sub ecx, 4
cmp eax, esi
mov dword [ecx], edx
jne 0x4b1af8
mov ecx, dword [esp + 0x24]
lea eax, [esi + 4]
cmp esi, eax
je 0x4b1b21
mov ecx, dword [edi]
mov dword [esi], ecx
add esi, 4
cmp esi, eax
jne 0x4b1b12
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
add ecx, 4
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x34]
add edi, 4
movsx edx, word [ebp]
inc eax
mov dword [esp + 0x2c], edi
cmp eax, edx
mov dword [esp + 0x34], eax
jl 0x4b19b3
inc dword [esp + 0x18]
jmp 0x4b187e
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
inc dword [esp + 0x18]
jmp 0x4b187e
mov ebx, dword [esp + 0x20]
xor edi, edi
cmp word [ebp], di
jle 0x4b1c0d
mov ebx, dword [esp + 0x38]
lea esi, [esp + 0x48]
mov ebp, 0x6e7dbc
push edi
call fcn.004b1d40
mov eax, dword [esi]
add esp, 4
test eax, eax
je 0x4b1bee
lea ecx, [esp + 0x10]
push ecx
push eax
call dword [0x65e1c0]
test eax, eax
je 0x4b1bc2
mov eax, dword [esp + 0x10]
cmp eax, 0x103
je 0x4b1bc2
cmp eax, 1
jne 0x4b1bbb
cmp dword [ebp], 0
jl 0x4b1bbb
mov word [ebx], 1
jmp 0x4b1bdf
mov word [ebx], 0
jmp 0x4b1bdf
mov edx, dword [esi]
push 0x12c
push edx
call dword [0x65e1b8]
test eax, eax
je 0x4b1bdf
mov eax, dword [esi]
push 0
push eax
call dword [0x65e1b4]
mov ecx, dword [esi]
push ecx
call dword [0x65e18c]
mov dword [esi], 0
mov ecx, dword [esp + 0x14]
inc edi
add ebp, 0x10
add ebx, 2
movsx edx, word [ecx]
add esi, 4
cmp edi, edx
jl 0x4b1b7f
mov ebx, dword [esp + 0x20]
jmp 0x4b1c11
mov ecx, dword [esp + 0x14]
movsx eax, word [ecx]
xor edi, edi
mov dword [esp + 0x30], 0xffffffff
test eax, eax
mov dword [esp + 0x34], 0x5f5e0ff
mov dword [esp + 0x40], eax
jle 0x4b1d04
mov eax, dword [esp + 0x38]
mov esi, 0x6e7dbc
mov dword [esp + 0x18], eax
lea ebp, [ecx + 0x3bd0]
mov ecx, dword [esp + 0x18]
cmp word [ecx], 0
je 0x4b1ce6
mov eax, dword [esi]
mov edx, dword [esi + 8]
mov dword [esp + 0x2c], edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv dword [esi + 4]
cmp eax, 0x5a
mov dword [esp + 0x10], eax
jle 0x4b1c8b
fild dword [esp + 0x2c]
lea eax, [eax + eax*2]
mov dword [esp + 0x10], eax
fmul qword [0x66a498]
fild dword [esp + 0x10]
faddp st(1)
jmp 0x4b1cb3
fild dword [esp + 0x2c]
cmp eax, 0x50
jle 0x4b1ca9
fmul qword [0x66a490]
lea ecx, [eax + eax]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
faddp st(1)
jmp 0x4b1cb3
fmul qword [0x665d60]
fiadd dword [esp + 0x10]
call fcn.00645030
mov ecx, dword [ebp]
mov edx, 0x64
sub edx, ecx
imul edx, eax
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul qword [0x65f9b0]
call fcn.00645030
cmp eax, dword [esp + 0x34]
jge 0x4b1ce6
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], edi
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
inc edi
add ebp, 4
add edx, 2
add esi, 0x10
cmp edi, eax
mov dword [esp + 0x18], edx
jl 0x4b1c45
mov eax, dword [esp + 0x38]
pop edi
pop esi
pop ebp
test eax, eax
je 0x4b1d1c
push eax
call fcn.00643cfc
mov ebx, dword [esp + 0x18]
add esp, 4
push ebx
call fcn.00643cfc
mov ecx, dword [esp + 0x298]
mov eax, dword [esp + 0x28]
add esp, 4
mov dword fs:[0], ecx
pop ebx
add esp, 0x29c
ret