Function at 0x69046290
Capabilities:
Access peb ldr_data
Get common file path
Get kernel32 base address
Get process heap flags
Set current directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x2c
mov eax, dword [eax]
test byte [eax + 0x34], 8
jne 0x690463e8
xor edi, edi
cmp edx, 1
je 0x6904642f
mov eax, ebx
call fcn.69045300
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jne 0x69046380
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
test edi, edi
je 0x690462ff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
sub esp, 4
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 esi
sub esp, 0xc
mov eax, dword [ebx + 4]
test eax, eax
je 0x69046440
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 8]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
lea edi, [ebx + 0x88]
add ebx, 0x9c
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov esi, dword [sym.imp.shell32.dll_ILFree]
sub esp, 0xc
mov eax, dword [edi]
add edi, 4
mov dword [esp], eax
call esi
sub esp, 4
cmp edi, ebx
jne 0x6904635d
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebx]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x690462c9
mov edx, dword [esi + 0x24]
test edx, edx
je 0x690462c9
mov ecx, dword [ebx + 4]
mov dword [esp], eax
test ecx, ecx
je 0x690464c0
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x24]
sub esp, 4
cmp edx, 1
ja 0x690463d2
jmp 0x69046510
sub edx, 1
add ecx, 2
add eax, 2
mov word [ecx - 2], si
cmp edx, 1
je 0x690463da
movzx esi, word [eax]
test si, si
jne 0x690463c0
xor edx, edx
mov word [ecx], dx
jmp 0x690462c9
mov dword [esp + 8], 0x208
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_HeapAlloc]
sub esp, 0xc
mov edi, eax
mov dword [esp + 4], eax
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
cmp esi, 2
je 0x690462b4
or dword [ebx + 0x70], 1
jmp 0x690462b4
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x10]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x18]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x1c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
jmp 0x6904630a
call dword [sym.imp.shlwapi.dll_PathFindFileNameA]
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x24]
sub esp, 4
cmp edx, 1
jbe 0x690464fc
lea esi, [ecx + edx - 1]
jmp 0x690464ed
add ecx, 1
add eax, 1
mov byte [ecx - 1], dl
cmp ecx, esi
je 0x690464f4
movzx edx, byte [eax]
test dl, dl
jne 0x690464e0
mov byte [ecx], 0
jmp 0x690462c9
test edx, edx
je 0x690462c9
jmp 0x690464f4
test edx, edx
je 0x690462c9
jmp 0x690463da