Function at 0x10054c90
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x1007b00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x638]
push esi
push edi
push 0x20a
push 0
push eax
mov dword [ebp - 0x64c], ebx
mov dword [ebp - 0x650], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x428]
push 0x20a
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x20a
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test ebx, ebx
je 0x10055045
xor eax, eax
cmp ax, word [ebx]
je 0x10055045
mov esi, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
push 0x2e
push ebx
call esi
add esp, 8
test eax, eax
jne 0x1005502c
push 0x5c
push ebx
call esi
add esp, 8
test eax, eax
jne 0x1005502c
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push eax
push eax
push str.pathext
call edi
mov esi, eax
test esi, esi
je 0x10055013
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea eax, [esi + 6]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call ebx
add esp, 4
mov dword [ebp - 0x644], eax
test eax, eax
je 0x10055013
push esi
push eax
push str.pathext
call edi
xor ecx, ecx
mov esi, eax
mov eax, dword [ebp - 0x644]
push ecx
push ecx
push str.path
mov word [eax + esi*2 - 2], cx
call edi
xor ecx, ecx
mov dword [ebp - 0x640], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call ebx
mov ebx, eax
add esp, 4
mov dword [ebp - 0x63c], ebx
test ebx, ebx
je 0x10054ff8
push dword [ebp - 0x640]
push ebx
push str.path
call edi
mov edi, dword [ebp - 0x644]
xor ecx, ecx
push 0xffffffffffffffff
push str._.DLL
mov word [ebx + eax*2 - 2], cx
mov ebx, edi
lea eax, [esi + 6]
mov dword [ebp - 0x648], edi
push eax
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
xor eax, eax
push 0x3b
push edi
mov word [edi + esi*2 + 8], ax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x18
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov dword [ebp - 0x640], eax
test eax, eax
jne 0x10054e34
test ebx, ebx
je 0x10054ff2
push ebx
call esi
mov esi, eax
jmp 0x10054e3a
mov esi, eax
sub esi, ebx
sar esi, 1
push 0x20a
lea eax, [ebp - 0x638]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x638]
cmp esi, 0x104
jbe 0x10054e65
push 0x103
jmp 0x10054e66
push esi
push ebx
push 0x104
push eax
call edi
mov eax, dword [ebp - 0x63c]
add esp, 0x10
mov edi, eax
push 0x3b
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x10054ea6
test edi, edi
je 0x10054fa8
push dword [ebp - 0x648]
call esi
mov esi, eax
jmp 0x10054eac
mov esi, ebx
sub esi, edi
sar esi, 1
push 0x20a
lea eax, [ebp - 0x428]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x428]
cmp esi, 0x104
jbe 0x10054ed7
push 0x103
jmp 0x10054ed8
push esi
push edi
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
push 0x104
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x428]
push 0x105
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x218]
push eax
call esi
test eax, eax
jle 0x10054f93
lea eax, [ebp - 0x218]
push eax
call esi
mov ecx, 0x5c
cmp cx, word [ebp + eax*2 - 0x21a]
je 0x10054f4a
push 0xffffffffffffffff
push 0x10067494
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
push 0xffffffffffffffff
push dword [ebp - 0x64c]
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
push 0xffffffffffffffff
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x20
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10054fcc
test ebx, ebx
je 0x10054fa8
lea edi, [ebx + 2]
push 0x3b
push edi
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
jmp 0x10054e89
mov ebx, dword [ebp - 0x640]
test ebx, ebx
je 0x10054ff2
add ebx, 2
push 0x3b
push ebx
mov dword [ebp - 0x648], ebx
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
add esp, 8
jmp 0x10054e15
push 0x103
lea eax, [ebp - 0x218]
push eax
push 0x104
push dword [ebp - 0x64c]
call edi
add esp, 0x10
mov dword [ebp - 0x650], 1
mov ebx, dword [ebp - 0x63c]
push dword [ebp - 0x644]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
test ebx, ebx
je 0x10055013
push ebx
call esi
add esp, 4
mov eax, dword [ebp - 0x650]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.100549d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005b6db
mov esp, ebp
pop ebp
ret 4