Function at 0x4050d5
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x544
push ebx
push esi
push edi
push 0x44
pop esi
xor edi, edi
push esi
lea eax, [ebp - 0x58]
push edi
push eax
call fcn.0041c100
mov ax, word [ebp + 0x14]
add esp, 0xc
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x2c], 1
mov word [ebp - 0x28], ax
je 0x4052fb
cmp dword [ebp + 0xc], edi
je 0x4052fb
lea eax, [ebp - 0x15c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x15c]
push eax
push edi
lea eax, [ebp - 0x15c]
push 0x427490
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [ebp - 0x15c]
push eax
call fcn.0041c055
lea eax, [ebp - 0x15c]
push 0x2e
push eax
call fcn.0041bb00
add esp, 0xc
cmp eax, edi
je 0x405168
and byte [eax], 0
mov edi, str..bat
lea eax, [ebp - 0x15c]
push edi
push eax
call fcn.0041bb40
push 0x180
lea eax, [ebp - 0x15c]
push 0x8321
push eax
call fcn.0041b2bd
add esp, 0x14
cmp eax, 0xffffffff
je 0x40532f
push eax
call fcn.0041b9a8
mov esi, dword [sym.imp.KERNEL32.dll__lopen]
pop ecx
lea eax, [ebp - 0x15c]
push 2
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0x14], eax
je 0x40532f
mov ebx, dword [ebp + 8]
push ebx
call fcn.0041c080
cmp eax, 3
pop ecx
jle 0x4052a6
lea eax, [eax + ebx - 4]
push edi
push eax
call fcn.00423160
pop ecx
test eax, eax
pop ecx
jne 0x4052a6
push eax
push ebx
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40520e
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll__lclose]
lea eax, [ebp - 0x15c]
push eax
call fcn.0041c055
pop ecx
jmp 0x40532f
mov esi, dword [sym.imp.KERNEL32.dll__llseek]
push 2
push 0
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x405241
push dword [ebp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll__lclose]
call esi
lea eax, [ebp - 0x15c]
push eax
call fcn.0041c055
pop ecx
push ebx
call esi
jmp 0x40532f
push 0
push 0
push ebx
call esi
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp + 8], eax
je 0x405294
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x40528b
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll__lread]
cmp eax, edi
jne 0x40528b
push edi
push esi
push dword [ebp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll__lwrite]
call esi
push 7
push str._r_ncls_r_n
push dword [ebp + 0x14]
call esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x4052d9
push ebx
lea eax, [ebp - 0x544]
push str._echo_off_r_n_s_r_ncls_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x544]
push eax
call fcn.0041c080
add esp, 0x10
push eax
lea eax, [ebp - 0x544]
push eax
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll__lwrite]
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll__lclose]
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x544]
push eax
call fcn.0041bb30
pop ecx
xor edi, edi
pop ecx
jmp 0x40530c
push dword [ebp + 8]
lea eax, [ebp - 0x544]
push eax
call fcn.0041bb30
pop ecx
pop ecx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x544]
push dword [ebp + 0x18]
push edi
push edi
push 1
push edi
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x405333
xor eax, eax
jmp 0x405385
cmp dword [ebp + 0xc], edi
je 0x405382
cmp dword [0x42b5c0], edi
je 0x405345
call fcn.00404d12
push 0x1770
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x405338
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp - 4], 0x103
je 0x405338
cmp dword [ebp + 0x10], edi
je 0x405382
lea eax, [ebp - 0x544]
push eax
call fcn.0041c055
pop ecx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret