Function at 0x4cb710
Capabilities:
Access peb ldr_data
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c0925
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x6510e8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x5c], esi
push 0x5c
call fcn.00581343
mov ecx, eax
xorps xmm0, xmm0
xor eax, eax
add esp, 4
movups xmmword [ecx + 8], xmm0
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x1c], 7
mov word [ecx + 8], ax
movups xmmword [ecx + 0x20], xmm0
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], 0xf
mov byte [ecx + 0x20], al
movups xmmword [ecx + 0x38], xmm0
mov dword [ecx + 0x48], eax
mov dword [ecx + 0x4c], 7
mov word [ecx + 0x38], ax
mov dword [ecx + 0x50], eax
mov dword [ecx + 0x54], eax
mov dword [ecx + 0x58], eax
mov eax, dword [ebx + 8]
mov dword [esi], ecx
mov dword [ecx], eax
mov ecx, dword [esi]
mov al, byte [ebx + 0xc]
push 0
push 0
mov byte [ecx + 4], al
mov eax, dword [esi]
mov byte [eax + 5], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
test esi, esi
je 0x4cbb52
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
xor eax, eax
mov dword [ebp - 0x18], 7
movups xmmword [ebp - 0x2c], xmm0
mov word [ebp - 0x2c], ax
lea edi, [esi + 1]
mov dword [ebp - 4], eax
test edi, edi
jne 0x4cb801
mov dword [ebp - 0x1c], edi
mov word [ebp + edi*2 - 0x2c], ax
jmp 0x4cb8d7
cmp edi, 7
ja 0x4cb825
mov ecx, edi
mov dword [ebp - 0x1c], edi
xor eax, eax
lea edi, [ebp - 0x2c]
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor ecx, ecx
mov word [ebp + esi*2 - 0x2a], cx
jmp 0x4cb8d7
cmp edi, 0x7ffffffe
ja 0x4cbb86
mov ecx, edi
or ecx, 7
cmp ecx, 0x7ffffffe
jbe 0x4cb845
mov ecx, SysReAllocString
jmp 0x4cb84f
mov eax, 0xa
cmp ecx, eax
cmovb ecx, eax
xor edx, edx
mov dword [ebp - 0x4c], ecx
mov eax, ecx
add eax, 1
setb dl
neg edx
or edx, eax
cmp edx, 0x7fffffff
ja 0x4cbb81
add edx, edx
cmp edx, 0x1000
jb 0x4cb8a0
lea eax, [edx + 0x23]
cmp eax, edx
jbe 0x4cbb81
push eax
call fcn.00581343
add esp, 4
test eax, eax
je 0x4cbb7c
mov ecx, dword [ebp - 0x4c]
lea edx, [eax + 0x23]
and edx, 0xffffffe0
mov dword [edx - 4], eax
jmp 0x4cb8b6
test edx, edx
je 0x4cb8b4
push edx
call fcn.00581343
mov ecx, dword [ebp - 0x4c]
add esp, 4
mov edx, eax
jmp 0x4cb8b6
xor edx, edx
mov dword [ebp - 0x18], ecx
mov eax, edi
mov dword [ebp - 0x1c], eax
mov ecx, edi
xor eax, eax
mov edi, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor ecx, ecx
mov word [edx + esi*2 + 2], cx
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], edx
cmp esi, edx
ja 0x4cb90d
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
mov word [eax + esi*2], cx
jmp 0x4cbabe
mov ecx, dword [ebp - 0x18]
sub esi, edx
mov eax, ecx
mov dword [ebp - 0x58], ecx
sub eax, edx
cmp esi, eax
ja 0x4cb955
lea eax, [edx + esi]
cmp ecx, 8
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
mov dword [ebp - 0x50], eax
lea edi, [eax + edx*2]
test esi, esi
je 0x4cb944
xor eax, eax
mov ecx, esi
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp - 0x50]
lea eax, [edx + esi]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x4cbabe
mov eax, SysReAllocString
sub eax, edx
cmp eax, esi
jb 0x4cbb86
lea edi, [esi + edx]
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x4cb979
mov edi, SysReAllocString
jmp 0x4cb99d
mov eax, ecx
shr eax, 1
mov dword [ebp - 0x48], eax
mov eax, SysReAllocString
sub eax, dword [ebp - 0x48]
cmp ecx, eax
jbe 0x4cb993
mov edi, SysReAllocString
jmp 0x4cb99d
mov eax, dword [ebp - 0x48]
add eax, ecx
cmp edi, eax
cmovb edi, eax
xor ecx, ecx
mov dword [ebp - 0x48], edi
add edi, 1
setb cl
neg ecx
or ecx, edi
cmp ecx, 0x7fffffff
ja 0x4cbb81
add ecx, ecx
cmp ecx, 0x1000
jb 0x4cb9ec
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x4cbb81
push eax
call fcn.00581343
add esp, 4
test eax, eax
je 0x4cbb7c
mov edx, dword [ebp - 0x4c]
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x4cba05
test ecx, ecx
je 0x4cba03
push ecx
call fcn.00581343
mov edx, dword [ebp - 0x4c]
add esp, 4
mov edi, eax
mov dword [ebp - 0x54], eax
jmp 0x4cba08
xor edi, edi
mov dword [ebp - 0x54], edi
lea eax, [esi + edx]
add edx, edx
cmp dword [ebp - 0x58], 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x18], eax
lea eax, [edx + edi]
mov dword [ebp - 0x50], eax
push edx
jb 0x4cba8c
mov eax, dword [ebp - 0x2c]
push eax
push edi
mov dword [ebp - 0x48], eax
call fcn.00582dc0
add esp, 0xc
test esi, esi
je 0x4cba4a
mov edi, dword [ebp - 0x50]
xor eax, eax
mov ecx, esi
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
add eax, esi
mov word [edi + eax*2], cx
mov eax, dword [ebp - 0x58]
lea ecx, [eax*2 + 2]
mov eax, dword [ebp - 0x48]
cmp ecx, 0x1000
jb 0x4cba80
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4cbb7c
mov eax, edx
push ecx
push eax
call fcn.005815c4
add esp, 8
jmp 0x4cbabb
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.00582dc0
add esp, 0xc
test esi, esi
je 0x4cbab0
mov edi, dword [ebp - 0x50]
xor eax, eax
mov ecx, esi
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x4c]
add eax, esi
xor ecx, ecx
mov word [edi + eax*2], cx
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push dword [ebp - 0x1c]
cmovae eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x44]
push eax
call fcn.004e5020
add esp, 8
mov esi, dword [ebp - 0x5c]
mov byte [ebp - 4], 1
push eax
mov ecx, dword [esi]
add ecx, 0x38
call fcn.004600e4
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10
jb 0x4cbb1a
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4cbb10
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4cbb77
push ecx
push edx
call fcn.005815c4
add esp, 8
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
jb 0x4cbb55
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4cbb46
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4cbb7c
push ecx
push edx
call fcn.005815c4
add esp, 8
jmp 0x4cbb55
mov esi, dword [ebp - 0x5c]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00581335
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
call fcn.00586698
call fcn.00586698
call fcn.00401549
call fcn.004015ed
int3