Function at 0x4c7bf0
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 0x5b56b5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x6360e8]
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.00577033
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 0x4c8032
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 0x4c7ce1
mov dword [ebp - 0x1c], edi
mov word [ebp + edi*2 - 0x2c], ax
jmp 0x4c7db7
cmp edi, 7
ja 0x4c7d05
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 0x4c7db7
cmp edi, 0x7ffffffe
ja 0x4c8066
mov ecx, edi
or ecx, 7
cmp ecx, 0x7ffffffe
jbe 0x4c7d25
mov ecx, SysReAllocString
jmp 0x4c7d2f
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 0x4c8061
add edx, edx
cmp edx, 0x1000
jb 0x4c7d80
lea eax, [edx + 0x23]
cmp eax, edx
jbe 0x4c8061
push eax
call fcn.00577033
add esp, 4
test eax, eax
je 0x4c805c
mov ecx, dword [ebp - 0x4c]
lea edx, [eax + 0x23]
and edx, 0xffffffe0
mov dword [edx - 4], eax
jmp 0x4c7d96
test edx, edx
je 0x4c7d94
push edx
call fcn.00577033
mov ecx, dword [ebp - 0x4c]
add esp, 4
mov edx, eax
jmp 0x4c7d96
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 0x4c7ded
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 0x4c7f9e
mov ecx, dword [ebp - 0x18]
sub esi, edx
mov eax, ecx
mov dword [ebp - 0x58], ecx
sub eax, edx
cmp esi, eax
ja 0x4c7e35
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 0x4c7e24
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 0x4c7f9e
mov eax, SysReAllocString
sub eax, edx
cmp eax, esi
jb 0x4c8066
lea edi, [esi + edx]
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x4c7e59
mov edi, SysReAllocString
jmp 0x4c7e7d
mov eax, ecx
shr eax, 1
mov dword [ebp - 0x48], eax
mov eax, SysReAllocString
sub eax, dword [ebp - 0x48]
cmp ecx, eax
jbe 0x4c7e73
mov edi, SysReAllocString
jmp 0x4c7e7d
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 0x4c8061
add ecx, ecx
cmp ecx, 0x1000
jb 0x4c7ecc
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x4c8061
push eax
call fcn.00577033
add esp, 4
test eax, eax
je 0x4c805c
mov edx, dword [ebp - 0x4c]
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x4c7ee5
test ecx, ecx
je 0x4c7ee3
push ecx
call fcn.00577033
mov edx, dword [ebp - 0x4c]
add esp, 4
mov edi, eax
mov dword [ebp - 0x54], eax
jmp 0x4c7ee8
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 0x4c7f6c
mov eax, dword [ebp - 0x2c]
push eax
push edi
mov dword [ebp - 0x48], eax
call fcn.00578ab0
add esp, 0xc
test esi, esi
je 0x4c7f2a
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 0x4c7f60
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c805c
mov eax, edx
push ecx
push eax
call fcn.005772b4
add esp, 8
jmp 0x4c7f9b
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.00578ab0
add esp, 0xc
test esi, esi
je 0x4c7f90
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.004c43c0
add esp, 8
mov esi, dword [ebp - 0x5c]
mov byte [ebp - 4], 1
push eax
mov ecx, dword [esi]
add ecx, 0x38
call fcn.00454148
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10
jb 0x4c7ffa
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4c7ff0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c8057
push ecx
push edx
call fcn.005772b4
add esp, 8
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
jb 0x4c8035
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4c8026
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c805c
push ecx
push edx
call fcn.005772b4
add esp, 8
jmp 0x4c8035
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.00577025
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
call fcn.0057c388
call fcn.0057c388
call fcn.00401539
call fcn.004015dd
int3