Function at 0x40d045
Capabilities:
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x61c4]
mov eax, 0x6240
call fcn.0041d7b0
mov eax, dword [0x450970]
xor eax, ebp
mov dword [ebp + 0x61c0], eax
push ebx
push esi
mov esi, dword [ebp + 0x61d0]
xor ebx, ebx
mov byte [0x4620c0], bl
cmp esi, ebx
je 0x40d3b0
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push edi
xor edi, edi
sar eax, 2
inc edi
cmp eax, edi
jbe 0x40d129
push edi
mov ecx, esi
call fcn.00406931
push str._create_i4j_log
push dword [eax]
call fcn.0041da65
pop ecx
pop ecx
test eax, eax
je 0x40d0f9
push edi
mov ecx, esi
call fcn.00406931
push str._create_e4j_log
push dword [eax]
call fcn.0041da65
pop ecx
pop ecx
test eax, eax
je 0x40d0f9
push edi
mov ecx, esi
call fcn.00406931
push 0x43c194
push dword [eax]
call fcn.0041da65
pop ecx
pop ecx
test eax, eax
je 0x40d0f9
push edi
mov ecx, esi
call fcn.00406931
push 0x43c174
push dword [eax]
call fcn.0041da65
pop ecx
pop ecx
test eax, eax
jne 0x40d129
push esi
push dword [esi + 0xc]
lea ecx, [ebp - 0x20]
call fcn.00408f8e
push edi
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x20]
call fcn.00405cc7
push dword [eax + 4]
mov ecx, esi
push dword [eax]
lea eax, [ebp - 0x20]
push eax
call fcn.0040d014
mov byte [0x463844], 1
cmp byte [ebp + 0x61d4], bl
je 0x40d3af
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
xor edi, edi
sar eax, 2
mov dword [ebp - 0x1c], edi
test eax, eax
jbe 0x40d3af
push edi
mov ecx, esi
call fcn.00406931
push str._temp
push dword [eax]
call fcn.0041da65
pop ecx
pop ecx
test eax, eax
je 0x40d195
push edi
mov ecx, esi
call fcn.00406931
push 0x43c15c
push dword [eax]
call fcn.0041da65
pop ecx
pop ecx
test eax, eax
je 0x40d195
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
inc edi
sar eax, 2
mov dword [ebp - 0x1c], edi
cmp edi, eax
jb 0x40d14b
jmp 0x40d3af
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 2
dec eax
cmp edi, eax
jae 0x40d384
inc edi
push edi
mov ecx, esi
call fcn.00406931
push dword [eax]
call fcn.0041da4b
pop ecx
test eax, eax
jbe 0x40d384
push edi
mov ecx, esi
call fcn.00406931
push dword [eax]
call fcn.0041da4b
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041d128
pop ecx
pop ecx
push edi
mov ecx, esi
mov dword [0x45f144], eax
call fcn.00406931
push dword [eax]
push dword [0x45f144]
call fcn.0041dfba
push 1
push ebx
push dword [0x45f144]
call fcn.00404b56
add esp, 0x14
test al, al
je 0x40d307
mov edi, 0x1770
push edi
mov dword [ebp - 0x14], ebx
call fcn.0041d128
pop ecx
lea ecx, [ebp - 0x14]
push ecx
push 0x438fa8
push edi
push eax
push dword [0x45f144]
mov dword [0x45f148], eax
call fcn.0041da4b
mov edi, dword [sym.imp.KERNEL32.dll_AreFileApisANSI]
pop ecx
inc eax
push eax
push dword [0x45f144]
push ebx
call edi
neg eax
sbb eax, eax
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp dword [ebp - 0x14], ebx
jne 0x40d27b
push 1
push ebx
push dword [0x45f148]
call fcn.00404ade
add esp, 0xc
test al, al
jne 0x40d2e9
push 0x1770
lea eax, [ebp + 0x2ed0]
push eax
push dword [0x45f144]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
lea eax, [ebp - 0x14]
push eax
push 0x438fa8
push 0x1770
push dword [0x45f148]
lea eax, [ebp + 0x2ed0]
push eax
mov dword [ebp - 0x14], ebx
call fcn.0041da4b
pop ecx
inc eax
push eax
lea eax, [ebp + 0x2ed0]
push eax
push ebx
call edi
neg eax
sbb eax, eax
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp dword [ebp - 0x14], ebx
jne 0x40d307
push 1
push ebx
push dword [0x45f148]
call fcn.00404ade
add esp, 0xc
test al, al
je 0x40d307
push dword [0x45f148]
push dword [0x45f144]
push str.Using_manual_temp_dir__s___S_
call fcn.0040b684
add esp, 0xc
jmp 0x40d3af
push dword [0x45f148]
push dword [0x45f144]
push str.Manual_temp_dir_not_usable__s___S_
call fcn.0040b684
mov eax, dword [0x45f144]
add esp, 0xc
cmp eax, ebx
je 0x40d336
push eax
call fcn.0041d558
pop ecx
mov dword [0x45f144], ebx
mov eax, dword [0x45f148]
cmp eax, ebx
je 0x40d34c
push eax
call fcn.0041d558
pop ecx
mov dword [0x45f148], ebx
push esi
push dword [esi + 0xc]
lea ecx, [ebp - 0x18]
call fcn.00408f8e
push 1
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x18]
call fcn.00405cc7
mov ecx, eax
call fcn.00405cc7
push dword [eax + 4]
mov ecx, esi
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call fcn.0040d014
push esi
push dword [esi + 0xc]
lea ecx, [ebp - 0x18]
call fcn.00408f8e
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x18]
call fcn.00405cc7
push dword [eax + 4]
mov ecx, esi
push dword [eax]
lea eax, [ebp - 0x38]
push eax
call fcn.0040d014
pop edi
push esi
call fcn.004038a5
mov eax, dword [ebp + 0x61cc]
mov dword [0x46383c], eax
push 2
lea eax, [ebp - 0x14]
push eax
push 0x7d1
call fcn.004037a1
mov al, byte [ebp - 0x14]
add esp, 0x10
mov byte [0x463830], al
cmp al, 0x65
jne 0x40d3f6
mov dword [0x463838], str.exe4j
mov dword [0x463834], 0x43bd74
jmp 0x40d40a
mov dword [0x463838], str.install4j
mov dword [0x463834], 0x43bd54
cmp byte [0x463841], bl
je 0x40d41a
cmp byte [0x463842], bl
je 0x40d487
push 0x1770
lea eax, [ebp + 0x2ed0]
push eax
push 0x92
call fcn.0040376b
add esp, 0xc
cmp word [ebp + 0x2ed0], bx
je 0x40d47c
lea eax, [ebp + 0x2ed0]
push 1
push eax
call fcn.0040639d
push 1
push 1
lea eax, [ebp + 0x2ed0]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004053e2
add esp, 0x18
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x10]
push eax
push str.change_working_directory_to__s
call fcn.0040b684
pop ecx
jmp 0x40d486
push str.working_directory_unchanged
call fcn.0040b684
pop ecx
cmp byte [0x463844], bl
je 0x40d578
call fcn.0040b618
push eax
lea eax, [ebp + 0x2ed0]
push str.The_following_log_file_will_be_created:_n_n_s_n_nDo_you_want_to_open_an_Explorer_window_
push eax
call fcn.0041dfd9
add esp, 0xc
push 4
push dword [0x463834]
lea eax, [ebp + 0x2ed0]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
jne 0x40d578
mov esi, 0x104
lea eax, [ebp + 0x5fb8]
push esi
push eax
call fcn.0040b618
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push esi
lea eax, [ebp + 0x5db0]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp + 0x5fb8]
push eax
lea eax, [ebp + 0x5db0]
push eax
lea eax, [ebp + 0x2ed0]
push str._sexplorer.exe__select__s
push eax
call fcn.0041dfd9
lea eax, [ebp + 0x2ed0]
push eax
push str.calling__s
call fcn.0040b684
push 0x10
lea eax, [ebp - 0x30]
push ebx
push eax
call fcn.00420080
push 0x44
pop esi
push esi
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.00420080
add esp, 0x30
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push 0x20
push 1
push ebx
push ebx
lea eax, [ebp + 0x2ed0]
push eax
push ebx
mov dword [ebp - 0x7c], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40d578
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.could_not_open_explorer_window__d
call fcn.0040b684
pop ecx
pop ecx
mov ecx, dword [ebp + 0x61c0]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d798
add ebp, 0x61c4
leave
ret