Function at 0x52d350
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5d2401
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0x28]
cmp esi, ecx
mov dword [esp + 0x20], 0
jl 0x52d504
lea ebx, [esi + 1]
test ebx, ebx
jne 0x52d3cc
mov edi, dword [ebp + 4]
test edi, edi
je 0x52d3bf
mov eax, ecx
dec ecx
test eax, eax
je 0x52d3ac
lea ebx, [ecx + 1]
push 0
mov ecx, edi
call fcn.0052d650
add edi, 0x10
dec ebx
jne 0x52d39d
mov eax, dword [ebp + 4]
push eax
call fcn.0058ed21
add esp, 4
mov dword [ebp + 4], 0
xor eax, eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], eax
jmp 0x52d504
mov eax, dword [ebp + 4]
test eax, eax
jne 0x52d42e
mov edi, ebx
shl edi, 4
push edi
call fcn.0058ecf8
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
mov dword [ebp + 4], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x10], esi
rep stosb byte es:[edi], al
lea edi, [ebx]
mov dword [esp + 0x14], esi
test esi, esi
mov byte [esp + 0x20], 1
je 0x52d414
mov ecx, esi
call fcn.0052d5a0
add esi, 0x10
dec edi
mov byte [esp + 0x20], 0
mov dword [esp + 0x10], esi
jne 0x52d400
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], ebx
jmp 0x52d500
mov edi, dword [ebp + 0xc]
cmp ebx, edi
jg 0x52d46b
cmp ecx, ebx
jge 0x52d451
mov edx, ebx
sub edx, ecx
shl ecx, 4
add ecx, eax
push edx
push ecx
call fcn.0052d670
mov dword [ebp + 8], ebx
jmp 0x52d504
jle 0x52d463
sub ecx, ebx
push ecx
mov ecx, ebx
shl ecx, 4
add ecx, eax
push ecx
call fcn.0052d5d0
mov dword [ebp + 8], ebx
jmp 0x52d504
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x52d495
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x52d489
mov eax, 4
jmp 0x52d495
cmp eax, 0x400
jle 0x52d495
mov eax, 0x400
add eax, edi
cmp ebx, eax
mov dword [esp + 0x10], eax
jl 0x52d4a3
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x10]
shl edx, 4
push edx
call fcn.0058ecf8
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 4]
shl ecx, 4
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, ebx
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x14], eax
sub edx, ecx
shl ecx, 4
add ecx, eax
push edx
push ecx
call fcn.0052d670
mov eax, dword [ebp + 4]
push eax
call fcn.0058ed21
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [ebp + 4], eax
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ecx
mov esi, dword [esp + 0x28]
mov eax, dword [ebp + 4]
lea edx, [esp + 0x2c]
shl esi, 4
add esi, eax
push edx
mov ecx, esi
call fcn.00593814
lea eax, [esp + 0x30]
lea ecx, [esi + 4]
push eax
call fcn.00593814
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esi + 8]
call fcn.00593814
lea edx, [esp + 0x38]
lea ecx, [esi + 0xc]
push edx
call fcn.00593814
lea ecx, [esp + 0x38]
mov dword [esp + 0x20], 4
call fcn.005936db
lea ecx, [esp + 0x34]
mov byte [esp + 0x20], 3
call fcn.005936db
lea ecx, [esp + 0x30]
mov byte [esp + 0x20], 2
call fcn.005936db
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], 0xffffffff
call fcn.005936db
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 0x14