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

Disassembly:
sub esp, 0x60
mov eax, 0x51eb851f
push ebx
push ebp
push esi
mov esi, dword [esp + 0x80]
push edi
lea ecx, [esi*4]
imul ecx
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp esi, 0x64
ja 0x10160f45
mov ebp, dword [esp + 0x74]
test ebp, ebp
je 0x10160f45
mov esi, dword [esp + 0x78]
test esi, esi
jle 0x10160f45
mov ebx, dword [esp + 0x7c]
test ebx, ebx
jle 0x10160f45
lea eax, [edi*2 + 1]
cmp eax, esi
jle 0x10160c93
lea edi, [esi - 1]
sar edi, 1
lea eax, [edi*2 + 1]
cmp eax, ebx
jle 0x10160ca3
lea edi, [ebx - 1]
sar edi, 1
test edi, edi
jle 0x10160f38
push 0x4c
lea eax, [esp + 0x28]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esp + 0x30]
push eax
push edi
push dword [esp + 0x94]
push ebx
push esi
push ebp
call fcn.10160a00
add esp, 0x24
test eax, eax
je 0x10160f45
cmp dword [esp + 0x5c], 2
jle 0x10160f2c
mov edx, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
cmp edx, dword [esp + 0x28]
jge 0x10160f2c
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x34]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebp
nop dword [eax]
xor edi, edi
mov dword [esp + 0x20], 0
test ebx, ebx
jle 0x10160d97
mov ebp, dword [esp + 0x50]
mov esi, ecx
mov ecx, dword [esp + 0x84]
sub ecx, dword [esp + 0x50]
sub ebp, esi
mov bx, word [esp + 0x20]
mov dword [esp + 0x84], ecx
nop dword [eax]
mov eax, dword [esp + 0x10]
lea edx, [esi + ebp]
lea esi, [esi + 2]
movzx eax, byte [edi + eax]
inc edi
add bx, ax
movzx eax, word [edx + ecx]
add ax, bx
movzx ecx, ax
mov ax, cx
sub ax, word [esi - 2]
mov word [edx], ax
mov word [esi - 2], cx
mov ecx, dword [esp + 0x84]
cmp edi, dword [esp + 0x24]
jl 0x10160d50
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x50]
mov eax, ecx
lea ecx, [ecx + ebx*2]
mov dword [esp + 0x84], eax
mov eax, ecx
cmp eax, esi
cmove ecx, dword [esp + 0x48]
mov dword [esp + 0x18], ecx
test edx, edx
js 0x10160dc9
mov eax, dword [esp + 0x28]
dec eax
cmp edx, eax
jge 0x10160dc9
add ebp, dword [esp + 0x2c]
mov dword [esp + 0x10], ebp
mov edi, dword [esp + 0x3c]
cmp edx, edi
jl 0x10160f19
mov ebp, dword [esp + 0x58]
xor ecx, ecx
test edi, edi
js 0x10160e06
lea edx, [esi + edi*2]
lea esi, [edx - 2]
mov ax, word [edx]
lea edx, [edx - 2]
add ax, word [esi]
lea esi, [esi + 2]
movzx eax, ax
imul eax, dword [esp + 0x40]
shr eax, 0x10
mov word [ebp + ecx*2], ax
inc ecx
cmp ecx, edi
jle 0x10160de5
mov esi, dword [esp + 0x3c]
mov edi, ebx
sub edi, esi
cmp ecx, edi
jge 0x10160e56
mov edx, dword [esp + 0x50]
lea eax, [ecx + esi]
lea edx, [edx + eax*2]
mov eax, ecx
sub eax, esi
mov esi, dword [esp + 0x50]
lea esi, [esi + eax*2]
add esi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edx]
lea esi, [esi + 2]
sub ax, word [esi - 2]
lea edx, [edx + 2]
movzx eax, ax
imul eax, dword [esp + 0x40]
shr eax, 0x10
mov word [ebp + ecx*2], ax
inc ecx
cmp ecx, edi
jl 0x10160e30
mov esi, dword [esp + 0x3c]
cmp ecx, ebx
jge 0x10160ead
mov edi, dword [esp + 0x50]
mov eax, ecx
sub eax, esi
dec eax
lea edx, [edi + eax*2]
lea eax, [ebx + ebx]
sub eax, ecx
sub eax, esi
lea esi, [edi - 4]
mov edi, dword [esp + 0x40]
lea esi, [esi + eax*2]
nop word [eax + eax]
mov eax, dword [esp + 0x50]
lea esi, [esi - 2]
lea edx, [edx + 2]
mov ax, word [eax + ebx*2 - 2]
add ax, ax
sub ax, word [esi + 2]
sub ax, word [edx - 2]
movzx eax, ax
imul eax, edi
shr eax, 0x10
mov word [ebp + ecx*2], ax
inc ecx
cmp ecx, ebx
jl 0x10160e80
mov edi, dword [esp + 0x14]
xor edx, edx
test ebx, ebx
jle 0x10160f09
nop word [eax + eax]
movzx esi, byte [edi + edx]
cmp esi, dword [esp + 0x64]
jge 0x10160f04
cmp esi, dword [esp + 0x60]
jle 0x10160f04
movzx ecx, word [ebp + edx*2]
lea eax, [esi*4]
sub ecx, eax
mov eax, dword [esp + 0x6c]
movsx eax, word [eax + ecx*2]
add eax, esi
test eax, 0xffffff00
jne 0x10160ef4
movzx eax, al
jmp 0x10160f01
sar eax, 0x1f
and eax, 0xffffff01
add eax, 0xff
mov byte [edi + edx], al
inc edx
cmp edx, ebx
jl 0x10160ec0
add edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], edi
mov ebp, dword [esp + 0x10]
inc edx
mov dword [esp + 0x1c], edx
cmp edx, dword [esp + 0x28]
jl 0x10160d20
push dword [esp + 0x44]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret