Function at 0x422e5b
Capabilities:
Resolve path using msvcrt
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x448014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x254], edx
xor edi, edi
mov dword [ebp - 0x24c], ebx
mov ecx, 0x800
mov dword [ebp - 0x250], edi
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x23c], edi
call fcn.00426640
mov esi, eax
push 0x400
push esi
mov dword [ebp - 0x238], esi
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wgetcwd]
pop ecx
pop ecx
test eax, eax
je 0x422eed
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, di
jne 0x422eba
sub esi, ecx
sar esi, 1
inc esi
lea ecx, [esi + esi]
call fcn.00426640
push dword [ebp - 0x238]
mov edi, eax
push esi
push edi
mov dword [ebp - 0x234], edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
xor edi, edi
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x22c], edi
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__get_wpgmptr]
mov esi, dword [ebp - 0x22c]
pop ecx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, di
jne 0x422f0a
sub esi, ecx
sar esi, 1
inc esi
lea ecx, [esi + esi]
call fcn.00426640
push dword [ebp - 0x22c]
mov dword [ebp - 0x244], eax
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
mov edi, 0x401244
mov edx, ebx
mov ecx, edi
push dword [ebx + 0x1c]
call fcn.00426670
pop ecx
lea esi, [eax + 1]
lea ecx, [esi + esi]
call fcn.00426640
push dword [ebx + 0x1c]
mov edx, esi
mov dword [ebp - 0x240], eax
push ebx
push edi
mov ecx, eax
call fcn.00426d80
mov edx, dword [0x44a8ec]
add esp, 0xc
test edx, edx
je 0x422fd7
xor eax, eax
mov edi, 0x44b100
push ecx
mov ecx, edi
mov word [0x44b100], ax
call fcn.004225ce
mov dword [esp], 0x401198
mov edx, edi
push 0x400
mov ecx, 0x4011a4
call fcn.00423919
mov esi, edi
xor edx, edx
pop ecx
pop ecx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x422fad
sub esi, ecx
sar esi, 1
inc esi
lea ecx, [esi + esi]
call fcn.00426640
push edi
push esi
push eax
mov dword [ebp - 0x23c], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
mov edi, dword [ebx + 4]
xor eax, eax
mov esi, eax
mov eax, 0x400
mov dword [ebp - 0x22c], eax
jmp 0x423013
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x250]
jne 0x422feb
sub ecx, edx
sar ecx, 1
add ecx, 2
add esi, ecx
mov ecx, dword [edi + 0x10]
test ecx, ecx
jne 0x42302a
mov eax, dword [ebp - 0x22c]
mov edi, dword [edi + 4]
test edi, edi
je 0x423048
mov ecx, edi
call fcn.004232ee
test al, al
je 0x42300a
mov ecx, dword [edi + 0xc]
lea edx, [ecx + 2]
jmp 0x422feb
test byte [edi], 0x20
jne 0x43a7a3
call fcn.00426840
add esi, eax
inc eax
cmp dword [ebp - 0x22c], eax
jae 0x42300a
jmp 0x43a7b5
cmp dword [0x44a098], 0
jne 0x423054
add esi, 4
lea ecx, [eax + eax]
add esi, 3
call fcn.00426640
lea ecx, [esi + esi]
mov dword [ebp - 0x22c], eax
call fcn.00426640
mov edi, eax
xor eax, eax
mov ecx, edi
mov word [edi], ax
jmp 0x4230e4
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x42312a
mov ecx, ebx
call fcn.004232ee
mov ecx, dword [ebp - 0x230]
test al, al
je 0x423078
mov eax, ecx
mov edx, esi
sub eax, edi
sar eax, 1
push 0x40134c
sub edx, eax
call fcn.00426b98
pop ecx
push dword [ebx + 0xc]
mov ecx, eax
mov edx, esi
sub ecx, edi
sar ecx, 1
sub edx, ecx
mov ecx, eax
call fcn.00426b98
mov edx, dword [ebx + 0x10]
pop ecx
mov ecx, eax
mov dword [ebp - 0x248], ecx
test edx, edx
jne 0x4230ec
mov eax, ecx
mov edx, esi
sub eax, edi
sar eax, 1
push 0x40138c
sub edx, eax
call fcn.00426b98
pop ecx
mov ecx, eax
mov dword [ebp - 0x230], ecx
jmp 0x423078
sub ecx, edi
mov eax, esi
sar ecx, 1
sub eax, ecx
test byte [ebx], 0x20
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x230], eax
jne 0x43a7c0
call fcn.00426bd0
push dword [ebp - 0x22c]
mov edx, dword [ebp - 0x230]
mov ecx, dword [ebp - 0x248]
call fcn.00426b98
pop ecx
mov ecx, eax
jmp 0x4230cd
cmp dword [0x44a098], 0
jne 0x423182
mov eax, dword [ebp - 0x24c]
xor edx, edx
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 0x14]
sub eax, edx
je 0x43a80e
sub eax, 1
jne 0x43a7f4
mov eax, 0x4011ac
push eax
mov eax, ecx
mov edx, esi
sub eax, edi
sar eax, 1
sub edx, eax
call fcn.00426b98
mov ecx, eax
mov dword [esp], 0x40138c
sub ecx, edi
mov edx, esi
sar ecx, 1
sub edx, ecx
mov ecx, eax
call fcn.00426b98
pop ecx
mov ecx, eax
mov eax, ecx
sub eax, edi
sar eax, 1
sub esi, eax
push 0x4011b4
mov edx, esi
call fcn.00426b98
cmp dword [0x44ce20], 0
mov esi, dword [ebp - 0x234]
pop ecx
jne 0x43a818
mov ebx, dword [ebp - 0x23c]
cmp dword [0x44d670], 0
jne 0x423287
call fcn.0042222d
test al, al
je 0x43a8a1
mov ecx, edi
call fcn.004222b6
test al, al
je 0x43a8a1
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x250]
jne 0x4231de
sub ecx, edx
sar ecx, 1
push 0x44c568
lea eax, [ecx + 1]
push eax
push 0x4011bc
lea eax, [ebp - 0x228]
push 0x10e
push eax
call fcn.0042ad58
add esp, 0x14
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
je 0x423233
mov eax, dword [ebp - 0x234]
push eax
push 0x4011c8
call esi
test eax, eax
je 0x43a8b8
push dword [ebp - 0x244]
push 0x4011d8
call esi
test eax, eax
je 0x43a8b8
push dword [ebp - 0x240]
push 0x4011e8
call esi
test eax, eax
je 0x43a8b8
test ebx, ebx
je 0x423271
push ebx
push 0x4011f8
call esi
test eax, eax
je 0x43a8b8
lea eax, [ebp - 0x228]
push eax
push 0x401208
call esi
test eax, eax
je 0x43a8b8
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
call esi
pop ecx
test ebx, ebx
je 0x423299
push ebx
call esi
pop ecx
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x4232a7
push eax
call esi
pop ecx
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x4232b5
push eax
call esi
pop ecx
mov eax, dword [ebp - 0x234]
test eax, eax
je 0x4232c3
push eax
call esi
pop ecx
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x4232d1
push eax
call esi
pop ecx
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x4232df
push eax
call esi
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042e014
leave
ret
push dword [ebx + 0x1c]
mov edx, ebx
call fcn.00426670
pop ecx
add esi, eax
jmp 0x42300a
mov dword [ebp - 0x22c], eax
jmp 0x423010
mov eax, dword [ebp - 0x24c]
push dword [eax + 0x1c]
push eax
push edx
mov edx, 0x400
call fcn.00426d80
mov edx, dword [ebp - 0x22c]
add esp, 0xc
mov ecx, dword [ebp - 0x238]
call fcn.00426bd0
push dword [ebp - 0x238]
jmp 0x423114
sub eax, 1
je 0x423152
sub eax, 1
je 0x423152
sub eax, 1
jmp 0x423152
mov eax, 0x4201f0
jmp 0x423157
mov ebx, 0x4201f8
test esi, esi
je 0x43a832
push esi
push 0x4011c8
push ebx
push 2
call fcn.004258b5
add esp, 0x10
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x43a84d
push eax
push 0x4011d8
push ebx
push 2
call fcn.004258b5
add esp, 0x10
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x43a868
push eax
push 0x4011e8
push ebx
push 2
call fcn.004258b5
add esp, 0x10
mov ebx, dword [ebp - 0x23c]
test ebx, ebx
je 0x43a887
push ebx
push 0x4011f8
push 0x4201f8
push 2
call fcn.004258b5
add esp, 0x10
push edi
push 0x401208
push 0x4201f8
push 2
call fcn.004258b5
add esp, 0x10
jmp 0x4231b0
push dword [ebp - 0x254]
push 0x1f72
call fcn.00422168
pop ecx
pop ecx
jmp 0x4231d9
push dword [ebp - 0x254]
push 0x1f5d
call fcn.00422168
pop ecx
pop ecx
jmp 0x423287