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

Disassembly:
sub esp, 0x68
mov cl, byte [esp + 0xa4]
mov edx, 1
push ebx
push ebp
mov ebp, dword [esp + 0x78]
test cl, cl
push esi
push edi
mov edi, 4
mov eax, edi
cmovne eax, edx
xor ebx, ebx
mov dword [esp + 0x74], eax
test cl, cl
mov eax, dword [esp + 0x7c]
mov edx, 0x40
mov dword [esp + 0x10], ebx
mov esi, dword [eax + 0x5d16c]
mov eax, 0x80
cmove edx, eax
mov eax, dword [ebp + 0x10d4]
mov dword [esp + 0xb4], edx
mov dword [esp + 0x7c], edx
test eax, eax
jns 0x10157f56
mov ecx, eax
sar ecx, 3
add ecx, edx
mov dword [esp + 0x7c], ecx
mov eax, dword [ebp + 0x10dc]
test eax, eax
jns 0x10157f6e
sar eax, 3
add eax, edx
mov edx, eax
mov dword [esp + 0xb4], eax
cmp byte [esp + 0xb0], bl
jne 0x10157f80
test esi, esi
cmovne ebx, edi
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x94]
xor ecx, ecx
sub dword [esp + 0x8c], eax
sub dword [esp + 0x90], eax
mov esi, dword [esp + 0x88]
mov ebp, dword [esp + 0xa4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x24], ecx
nop dword [eax]
mov eax, ecx
mov byte [esi + ecx + 1], 0
and eax, 1
mov dword [esp + 0x18], 0
shl eax, 6
lea edi, [esi + 5]
mov dword [esp + 0x50], eax
mov eax, ecx
and eax, 0xfffffffe
mov dword [esp + 0x20], 0
shl eax, 5
mov dword [esp + 0x54], eax
lea eax, [ecx*4]
lea ecx, [eax*4 + 0x15]
add edi, eax
shl eax, 4
add eax, dword [esp + 0x98]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
and eax, 1
mov byte [edi], 0
mov edi, dword [esp + 0x8c]
shl eax, 5
add eax, dword [esp + 0x50]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x18]
and eax, 0xfffffffe
shl eax, 4
add eax, dword [esp + 0x54]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x94]
add edi, eax
mov dword [esp + 0x70], edi
mov edi, dword [esp + 0x8c]
mov dword [eax + edi], 0
mov edi, dword [esp + 0x90]
mov dword [edi + eax], 0
xor edi, edi
mov dword [eax], closesocket
xor eax, eax
add ecx, esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x5c]
mov esi, eax
and eax, 0xfffffffe
and esi, 1
shl esi, 4
add esi, dword [esp + 0x58]
mov dword [esp + 0x48], esi
lea ecx, [ecx + eax*8]
mov eax, dword [esp + 0x20]
add eax, edi
mov dword [esp + 0x44], ecx
mov edi, dword [esp + 0x84]
add eax, dword [edi + 0x50]
mov edi, dword [esp + 0x24]
add edi, eax
cmp byte [esp + 0xb0], 0
mov dword [esp + 0x4c], edi
lea eax, [edi + 0xa0]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
mov byte [eax], 0
mov eax, dword [esp + 0x1c]
mov dword [eax], 0
je 0x1015828b
mov ecx, dword [esp + 0x14]
mov byte [ecx], 0
xor ecx, ecx
mov dword [eax], 1
mov eax, dword [esp + 0x7c]
sub eax, ebx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x4c], eax
lea eax, [edi + 0x140]
mov dword [esp + 0x28], eax
nop dword [eax]
mov eax, ecx
and eax, 1
lea edx, [esi + eax*8]
mov esi, dword [esp + 0x28]
mov eax, ecx
mov dword [esp + 0x68], edx
mov ecx, dword [esp + 0x44]
and eax, 0xfffffffe
xor ebx, ebx
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x6c], edi
mov eax, dword [eax + 0x10e8]
mov eax, dword [eax + 0x8c]
mov dword [esp + 0x64], eax
nop dword [eax]
mov eax, ebx
and eax, 1
lea ecx, [edx + eax*4]
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x60], ecx
xor edx, edx
lea eax, [edi + eax*2]
xor edi, edi
cmp ecx, dword [esp + 0x4c]
jge 0x1015819c
mov ecx, dword [esp + 0xb4]
sub ecx, dword [esp + 0x10]
cmp eax, ecx
jge 0x1015819c
imul eax, ebp
push ebp
add eax, dword [esp + 0x64]
add eax, dword [esp + 0xa4]
test byte [esp + 0x68], 8
push eax
je 0x1015818b
call fcn.101751f0
jmp 0x10158191
call dword [0x10b49738]
lea edi, [eax - 0x80]
add esp, 8
mov edx, edi
imul edx, edi
mov dword [esi], edx
inc ebx
mov edx, dword [esp + 0x68]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x6c]
mov dword [esi + 8], 0
add esi, 0x90
cmp ebx, 4
jl 0x10158140
mov ecx, dword [esp + 0x40]
add dword [esp + 0x28], 0x290
inc ecx
mov esi, dword [esp + 0x48]
mov dword [esp + 0x40], ecx
cmp ecx, 4
jl 0x10158100
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
add edi, 0xa90
mov ecx, dword [esp + 0x1c]
inc eax
inc dword [esp + 0x14]
add ecx, 4
mov edx, dword [esp + 0xb4]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], edi
cmp edi, 0x2a40
jl 0x10158075
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x38]
add eax, 0x2a90
inc dword [esp + 0x18]
inc edi
add dword [esp + 0x94], 4
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x34]
add ecx, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edi
cmp eax, 0xaa40
jl 0x10158006
mov ecx, dword [esp + 0x3c]
add dword [esp + 0x24], 0xaa90
inc ecx
mov eax, dword [esp + 0x94]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x94], eax
cmp ecx, dword [esp + 0x74]
jl 0x10157fb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 0x10e8]
test byte [eax + 0x8c], 8
je 0x1015834b
xor ecx, ecx
lea ebx, [edi + 0xf8]
mov dword [esp + 0x40], ecx
mov eax, ecx
xor edi, edi
and eax, 1
lea edx, [esi + eax*8]
mov esi, dword [esp + 0x44]
mov eax, ecx
mov dword [esp + 0x6c], edx
and eax, 0xfffffffe
lea esi, [esi + eax*4]
xor eax, eax
cmp edx, dword [esp + 0x7c]
jge 0x1015831d
cmp esi, dword [esp + 0xb4]
jge 0x1015831d
mov eax, esi
imul eax, ebp
push ebp
add eax, edx
add eax, dword [esp + 0xa4]
push eax
call fcn.10175250
mov edi, eax
mov eax, dword [esp + 0xb4]
imul esi, eax
push eax
add esi, dword [esp + 0x78]
add esi, dword [esp + 0xb4]
push esi
call fcn.10175250
mov ecx, dword [esp + 0x50]
sub edi, eax
mov eax, edi
add esp, 0x10
imul eax, edi
mov esi, dword [esp + 0x48]
inc ecx
mov dword [ebx - 8], eax
mov dword [ebx - 4], edi
mov dword [ebx], 0
add ebx, 0x290
mov dword [esp + 0x40], ecx
cmp ecx, 4
jl 0x101582b1
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x4c]
jmp 0x10158378
mov ebx, dword [esp + 0x28]
push edx
push dword [esp + 0x80]
push ebx
push ecx
push esi
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push ebp
push dword [esp + 0xc0]
call fcn.10157bd0
add esp, 0x24
mov edx, dword [edi + 0xf8]
mov ecx, dword [edi + 0xf4]
inc edx
add ecx, dword [edi + 0x384]
mov eax, dword [edi + 0xf0]
add eax, dword [edi + 0x380]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], edx
mov dword [ebx + 0x14], ecx
mov edx, dword [edi + 0x618]
mov ecx, dword [edi + 0x614]
inc edx
add ecx, dword [edi + 0x8a4]
mov eax, dword [edi + 0x610]
add eax, dword [edi + 0x8a0]
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x28], edx
mov dword [ebx + 0x24], ecx
mov eax, dword [edi + 0x610]
add eax, dword [edi + 0xf0]
mov ecx, dword [edi + 0xf4]
add ecx, dword [edi + 0x614]
mov edx, dword [edi + 0xf8]
mov dword [ebx + 0x30], eax
inc edx
mov eax, dword [esp + 0x4c]
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x34], ecx
mov edx, dword [edi + 0x388]
mov esi, dword [eax + 0x8a0]
inc edx
add esi, dword [eax + 0x380]
mov edi, dword [edi + 0x8a4]
add edi, dword [eax + 0x384]
mov dword [ebx + 0x44], edi
mov dword [ebx + 0x48], edx
mov dword [ebx + 0x40], esi
mov ecx, dword [ebx + 0x34]
mov eax, dword [ebx + 0x30]
add ecx, edi
mov edx, dword [ebx + 0x38]
add eax, esi
mov edi, dword [esp + 0x24]
inc edx
mov dword [ebx], eax
add edi, 0xa0
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x20]
mov dword [ebx + 4], ecx
mov ecx, dword [esp + 0x84]
mov dword [ebx + 8], edx
add eax, dword [ecx + 0x50]
mov ecx, dword [edi + eax + 8]
add edi, eax
mov eax, dword [edi + 4]
imul eax
call fcn.10511c50
mov ebx, dword [edi]
mov ecx, dword [edi + 8]
sub ebx, eax
mov edx, dword [esp + 0x94]
mov eax, dword [esp + 0x70]
shl ebx, 8
shr ebx, cl
mov dword [edi + 0xc], ebx
mov ecx, ebx
add dword [eax], ebx
cmp dword [edx], ebx
mov eax, dword [esp + 0x90]
cmovl ecx, dword [edx]
add eax, edx
mov dword [edx], ecx
mov edx, ebx
mov ecx, dword [esp + 0x9c]
cmp dword [eax], ebx
cmovg edx, dword [eax]
mov dword [eax], edx
mov eax, ebx
cdq
cmp edx, dword [ecx + 0x1c]
jl 0x101581da
jg 0x101584b3
cmp eax, dword [ecx + 0x18]
jbe 0x101581da
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x34]
mov esi, dword [esp + 0x88]
mov byte [eax + esi], 1
mov eax, dword [esp + 0x38]
mov byte [eax], 1
mov eax, dword [esp + 0x3c]
mov byte [esi + eax + 1], 1
mov byte [esi], 1
jmp 0x101581e1