Function at 0x414ef0
Capabilities:
Get common file path
Resolve function by parsing pe exports
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x4fe1db
mov eax, dword fs:[0]
push eax
mov eax, 0x1160
call fcn.004b7ac0
mov eax, dword [0x52e144]
xor eax, esp
mov dword [esp + 0x115c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x52e144]
xor eax, esp
push eax
lea eax, [esp + 0x1174]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1184]
push 0x50fa44
mov dword [esp + 0x18], esi
call fcn.00404690
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
push 0x104
lea eax, [esp + 0x70]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x414f91
call ebp
push eax
push 0x50fa24
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
mov byte [esp + 0x6c], bl
lea ecx, [esp + 0x6c]
push 0x5c
push ecx
call fcn.004b6d8c
add esp, 8
cmp eax, ebx
je 0x414fa8
mov byte [eax], bl
jmp 0x414fb2
mov edx, 0x2e
mov word [esp + 0x6c], dx
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edi, [esp + 0x6c]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x414fc2
mov cx, word [0x50e37c]
mov eax, esi
mov word [edi], cx
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x414fd8
lea edi, [esp + 0x6c]
sub eax, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x414fe6
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x50fa18
rep movsb byte es:[edi], byte [esi]
call fcn.00404690
add esp, 4
mov ecx, eax
jmp 0x415010
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x415010
lea edi, [esp + 0x6c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x415020
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x6c]
and ecx, 3
push ebx
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.004ba516
or edi, 0xffffffff
add esp, 8
cmp eax, edi
jne 0x415115
lea eax, [esp + 0x6c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x50fa08
call fcn.00404690
add esp, 4
mov edx, eax
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x415070
lea edi, [esp + 0x6c]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x415080
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4150a0
lea edi, [esp + 0x6c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4150b0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x50f9fc
rep movsb byte es:[edi], byte [esi]
call fcn.00404690
add esp, 4
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4150d5
lea edi, [esp + 0x6c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4150e5
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x6c]
push ebx
push ecx
call fcn.004ba516
add esp, 8
cmp eax, 0xffffffff
je 0x4151cc
or edi, 0xffffffff
jmp 0x415127
lea ecx, [esp + 0x1c]
mov dword [0x537cc4], 0xb
call fcn.00405cc0
push 0x5385ac
lea edx, [esp + 0x70]
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x1184], ebx
call fcn.00405e60
push 1
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x24]
call fcn.00406500
test al, al
jne 0x4151d3
call ebp
mov esi, dword [esp + 0x60]
call ebp
push eax
push esi
push 0x50f9e0
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0x10
push 1
lea ecx, [esp + 0x70]
push ecx
lea ecx, [esp + 0x24]
call fcn.00405fb0
movzx edx, al
push edx
push 0x50f9cc
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x117c], edi
call fcn.00405d20
xor al, al
jmp 0x4153f8
push 0x800
lea eax, [esp + 0x174]
push ebx
push eax
call fcn.004b6dc0
mov ecx, dword [0x526d04]
push ecx
call fcn.00404690
add esp, 0x10
add eax, 5
push eax
push 0x7ff
lea edx, [esp + 0x178]
push edx
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x2c]
call fcn.00406ef0
test al, al
jne 0x415254
call ebp
mov esi, dword [esp + 0x60]
call ebp
push eax
push esi
push 0x50f9b4
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0x10
lea ecx, [esp + 0x1c]
mov dword [esp + 0x117c], edi
call fcn.00405d20
xor al, al
jmp 0x4153f8
push 0x800
lea ecx, [esp + 0x974]
push ebx
push ecx
call fcn.004b6dc0
mov edx, dword [0x526d04]
push edx
call fcn.00404690
add eax, 5
push eax
push 0x7ff
lea eax, [esp + 0x988]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x8c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.00413a30
add esp, 0x28
test eax, eax
jne 0x4152b8
call ebp
mov esi, dword [0x538cfc]
call ebp
push eax
push esi
push 0x50f99c
jmp 0x415227
push 0x50f990
call fcn.004045b0
add esp, 4
lea ecx, [esp + 0x170]
push ecx
push ebx
push 0x50f980
mov esi, eax
call fcn.00404690
add esp, 4
push eax
push esi
call fcn.004375e0
add esp, 0x10
mov dword [0x537d34], eax
cmp eax, ebx
jne 0x415315
lea edx, [esp + 0x170]
push edx
push ebx
push 0x50f970
call fcn.00404690
add esp, 4
push eax
push esi
call fcn.004375e0
add esp, 0x10
mov dword [0x537d34], eax
push 0x50f964
call fcn.00404690
mov ebx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
add esp, 4
push eax
push ebx
call esi
test eax, eax
je 0x415349
push 0x50f958
call fcn.00404690
add esp, 4
push eax
push ebx
call esi
test eax, eax
jne 0x4153bc
mov eax, dword [0x537d34]
inc dword [0x537f18]
cmp eax, 3
jbe 0x415399
push 0x50f93c
call fcn.00404690
push eax
push 0x527e20
call fcn.00401350
push 0xc0070000
push 0x1caf8028
push 0x2ee0
call fcn.0040a3f0
add esp, 0x18
lea ecx, [esp + 0x1c]
mov dword [esp + 0x117c], edi
call fcn.00405d20
xor al, al
jmp 0x4153f8
mov ecx, dword [0x537f18]
push ecx
push eax
push 0x50f920
call fcn.00404690
add esp, 4
push eax
push 0x527e20
call fcn.00401350
add esp, 0x10
jmp 0x4153ce
push 0x50f904
call fcn.00404690
push eax
push 0x527e20
call fcn.00401350
add esp, 0xc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x117c], edi
call fcn.00405d20
mov al, 1
mov ecx, dword [esp + 0x1174]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x115c]
xor ecx, esp
call fcn.004b6da3
add esp, 0x116c
ret