Function at 0x4f1ee0
Capabilities:
Access peb ldr_data
Get common file path
Get process heap flags
Set current directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x214]
push ebx
mov ebx, edx
sub esp, 0x22c
mov dword [ebp - 0x21c], eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov dword [esp], 0x104
mov dword [ebp - 0x218], eax
call eax
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1c9
lea eax, [edi - 1]
cmp eax, 0x102
mov dword [esp + 4], str.GetCurrentDirectoryA_failed_n
setbe al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [ebp - 0x214], 0x61616161
mov dword [ebp - 0x210], 0x616161
mov dword [esp], edi
add edi, 1
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x218]
call eax
sub esp, 8
mov dword [ebp - 0x220], eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1cf
xor eax, eax
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x220]
mov dword [esp + 4], str.GetCurrentDirectoryA_returned__ld_instead_of__ld_n
cmp edi, edx
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1d0
mov dword [esp + 4], str.aaaaaaa
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiA]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.GetCurrentDirectoryA_should_not_have_modified_the_buffer_n
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp + 8], 0x20000
mov ecx, dword fs:[0x18]
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x220], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x220]
sub esp, 0xc
mov edi, eax
mov dword [ecx + 0x34], 0xdeadbeef
mov dword [ebp - 0x224], ecx
mov dword [eax], 0x6f6f66
mov dword [esp + 4], eax
mov dword [esp], 0x7fff
mov eax, dword [ebp - 0x218]
call eax
sub esp, 8
mov dword [ebp - 0x220], eax
call fcn.0057d110
mov ecx, dword [ebp - 0x224]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1d7
mov eax, dword [ecx + 0x34]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x220]
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
lea eax, [edx - 1]
mov dword [esp + 8], edx
cmp eax, 0x102
setbe al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov edx, dword [ebp - 0x220]
test edx, edx
jne 0x4f2670
mov ecx, dword fs:[0x18]
mov dword [ecx + 0x34], 0xdeadbeef
mov dword [ebp - 0x224], ecx
mov dword [edi], 0x6f6f66
mov dword [esp + 4], edi
mov dword [esp], 0x8000
mov eax, dword [ebp - 0x218]
call eax
sub esp, 8
mov dword [ebp - 0x220], eax
call fcn.0057d110
mov ecx, dword [ebp - 0x224]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1dc
mov eax, dword [ecx + 0x34]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x220]
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
lea eax, [edx - 1]
mov dword [esp + 8], edx
cmp eax, 0x102
setbe al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov edx, dword [ebp - 0x220]
test edx, edx
jne 0x4f2630
mov ecx, dword fs:[0x18]
mov dword [ecx + 0x34], 0xdeadbeef
mov dword [ebp - 0x224], ecx
mov dword [edi], 0x6f6f66
mov dword [esp + 4], edi
mov dword [esp], 0xffff
mov eax, dword [ebp - 0x218]
call eax
sub esp, 8
mov dword [ebp - 0x220], eax
call fcn.0057d110
mov ecx, dword [ebp - 0x224]
mov edx, dword [ebp - 0x220]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1e1
mov eax, dword [ecx + 0x34]
lea ecx, [edx - 1]
cmp ecx, 0x102
jbe 0x4f21d0
mov ecx, dword [0x8f0770]
mov dword [esp + 0xc], eax
test ecx, ecx
jne 0x4f25f8
test edx, edx
jne 0x4f2730
mov dword [esp + 8], 0
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
mov dword [esp], 1
call fcn.004e88d0
jmp 0x4f2225
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
mov dword [esp], 1
call fcn.004e88d0
mov eax, 0x1e2
call fcn.004e7d80
mov eax, dword [ebp - 0x21c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 4], str.wrong_result__s_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov ecx, dword fs:[0x18]
mov dword [ecx + 0x34], 0xdeadbeef
mov dword [ebp - 0x224], ecx
mov dword [edi], 0x6f6f66
mov dword [esp + 4], edi
mov dword [esp], 0x10000
mov eax, dword [ebp - 0x218]
call eax
sub esp, 8
mov dword [ebp - 0x220], eax
call fcn.0057d110
mov ecx, dword [ebp - 0x224]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1e6
mov eax, dword [ecx + 0x34]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x220]
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
lea eax, [edx - 1]
mov dword [esp + 8], edx
cmp eax, 0x102
setbe al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov edx, dword [ebp - 0x220]
test edx, edx
jne 0x4f26f0
mov ecx, dword fs:[0x18]
mov dword [ecx + 0x34], 0xdeadbeef
mov dword [ebp - 0x220], ecx
mov dword [edi], 0x6f6f66
mov dword [esp + 4], edi
mov dword [esp], 0x20000
mov eax, dword [ebp - 0x218]
call eax
sub esp, 8
mov dword [ebp - 0x218], eax
call fcn.0057d110
mov ecx, dword [ebp - 0x220]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x1eb
mov eax, dword [ecx + 0x34]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x218]
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
lea eax, [edx - 1]
mov dword [esp + 8], edx
cmp eax, 0x102
setbe al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov edx, dword [ebp - 0x218]
test edx, edx
jne 0x4f26b0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp], esi
mov dword [esp + 4], 0x5e8f3b
call fcn.004e7b60
mov dword [esp], 1
mov ecx, ebx
mov edx, esi
mov dword [esp + 4], str.check_1
mov edi, dword [ebp - 0x21c]
mov eax, edi
call fcn.004f1cb0
mov dword [esp], 1
xor ecx, ecx
mov edx, ebx
mov dword [esp + 4], str.check_2
mov eax, edi
call fcn.004f1cb0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
sub esp, 4
mov dword [esp + 8], ebx
mov dword [esp], esi
mov dword [esp + 0x10], str.notadir
mov dword [esp + 0xc], str.shortdir
mov dword [esp + 4], str._s_s_s
call fcn.004e7b60
mov dword [esp], 0
xor ecx, ecx
mov edx, esi
mov dword [esp + 4], str.check_3
mov eax, ebx
call fcn.004f1cb0
mov dword [esp + 8], ebx
mov dword [esp], esi
mov dword [esp + 0x10], str.NonExistent_Directory
mov dword [esp + 0xc], str.shortdir
mov dword [esp + 4], str._s_s_s
call fcn.004e7b60
mov dword [esp], 0
xor ecx, ecx
mov edx, esi
mov dword [esp + 4], str.check_4
mov eax, ebx
call fcn.004f1cb0
mov dword [esp + 8], ebx
mov dword [esp], esi
mov dword [esp + 0xc], str.Long_Directory
mov dword [esp + 4], 0x5e83f6
call fcn.004e7b60
mov dword [esp], 1
xor ecx, ecx
mov edx, esi
mov dword [esp + 4], str.check_5
mov eax, ebx
call fcn.004f1cb0
mov dword [esp], esi
mov dword [esp + 8], str.shortdir
mov dword [esp + 4], 0x5e8302
call fcn.004e7b60
lea eax, [ebp - 0x110]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], str.shortdir
mov dword [esp + 4], 0x5e83f6
mov dword [esp], eax
call fcn.004e7b60
mov dword [esp], 1
mov edx, esi
mov eax, ebx
mov dword [esp + 4], str.check_6
lea ecx, [ebp - 0x110]
call fcn.004f1cb0
mov dword [esp], esi
mov dword [esp + 8], str.shortdir
mov dword [esp + 4], 0x5e9147
call fcn.004e7b60
mov dword [esp], 1
mov edx, esi
mov eax, ebx
mov dword [esp + 4], str.check_7
lea ecx, [ebp - 0x110]
call fcn.004f1cb0
mov dword [esp], esi
mov dword [esp + 8], str.Long_Directory
mov dword [esp + 4], 0x5e8302
call fcn.004e7b60
lea eax, [ebp - 0x110]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], str.Long_Directory
mov dword [esp + 4], 0x5e83f6
mov dword [esp], eax
call fcn.004e7b60
mov dword [esp], 1
mov edx, esi
mov eax, ebx
mov dword [esp + 4], str.check_8
lea ecx, [ebp - 0x110]
call fcn.004f1cb0
mov dword [esp], esi
mov dword [esp + 8], str.Long_Directory
mov dword [esp + 4], 0x5e9147
call fcn.004e7b60
mov dword [esp], 1
mov edx, esi
mov eax, ebx
mov dword [esp + 4], str.check_9
lea ecx, [ebp - 0x110]
call fcn.004f1cb0
movsx eax, byte [ebx]
mov dword [esp], esi
mov dword [esp + 4], 0x5e8d7c
mov dword [esp + 8], eax
call fcn.004e7b60
mov dword [esp], 1
mov ecx, ebx
mov edx, esi
mov dword [esp + 4], str.check_10
mov eax, ebx
call fcn.004f1cb0
movsx eax, byte [ebx]
mov dword [esp], esi
mov dword [esp + 4], str._c:_
mov dword [esp + 8], eax
call fcn.004e7b60
mov dword [esp], 1
mov edx, esi
mov eax, ebx
mov dword [esp + 4], str.check_11
xor ecx, ecx
call fcn.004f1cb0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], edx
mov dword [ebp - 0x220], edx
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
mov dword [esp], 0
call fcn.004e88d0
mov edx, dword [ebp - 0x220]
test edx, edx
je 0x4f2225
jmp 0x4f21ec
mov eax, 0x1dd
call fcn.004e7d80
mov eax, dword [ebp - 0x21c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 4], str.wrong_result__s_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
jmp 0x4f2131
mov eax, 0x1d8
call fcn.004e7d80
mov eax, dword [ebp - 0x21c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 4], str.wrong_result__s_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
jmp 0x4f20a6
mov eax, 0x1ec
call fcn.004e7d80
mov eax, dword [ebp - 0x21c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 4], str.wrong_result__s_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
jmp 0x4f233b
mov eax, 0x1e7
call fcn.004e7d80
mov eax, dword [ebp - 0x21c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 4], str.wrong_result__s_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
jmp 0x4f22b0
mov dword [esp + 8], edx
mov dword [esp + 4], str.GetCurrentDirectoryA_failed__lu_err__lu_n
mov dword [esp], 0
call fcn.004e88d0
jmp 0x4f21ec