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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59099e
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x4b8
mov eax, dword [0x5f4e24]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x320]
push 0
push eax
call fcn.00565b20
add esp, 0xc
lea eax, [ebp - 0x320]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [ebp - 0x320]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40f1a0
mov eax, dword [str.selfCopy.bat]
mov dword [ecx], eax
mov eax, dword [0x5d50b0]
mov dword [ecx + 4], eax
mov eax, dword [0x5d50b4]
mov dword [ecx + 8], eax
mov al, byte [0x5d50b8]
push 0xff
mov byte [ecx + 0xc], al
lea eax, [ebp - 0x118]
push 0
push eax
call fcn.00565b20
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0xff
lea ecx, [ebp - 0x118]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0xff
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00565b20
mov edi, dword [0x5f5904]
add esp, 0xc
mov eax, dword [0x5f58f0]
cmp edi, 0x10
mov esi, dword [0x5f5900]
mov ecx, 0x5f58f0
cmovae ecx, eax
test esi, esi
jne 0x40f2bb
mov edx, 0x5d4835
sub esi, 4
jb 0x40f251
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40f256
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40f240
cmp esi, 0xfffffffc
je 0x40f28a
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40f283
cmp esi, 0xfffffffd
je 0x40f28a
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40f283
cmp esi, 0xfffffffe
je 0x40f28a
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x40f283
cmp esi, 0xffffffff
je 0x40f28a
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x40f28a
sbb eax, eax
or eax, 1
jmp 0x40f28c
xor eax, eax
test eax, eax
jne 0x40f2b6
xor ecx, ecx
mov al, byte [ebp + ecx - 0x118]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x219], al
test al, al
jne 0x40f292
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathA]
jmp 0x40f2dd
mov eax, dword [0x5f58f0]
cmp edi, 0x10
lea edx, [ebp - 0x218]
mov ecx, 0x5f58f0
cmovae ecx, eax
sub edx, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40f2d0
push 0x5f5920
lea ecx, [ebp - 0x3c8]
call fcn.00407b30
mov dword [ebp - 4], 0
mov eax, closesocket
mov ecx, dword [ebp - 0x3b8]
sub eax, ecx
cmp eax, 1
jb 0x40fc9a
cmp dword [ebp - 0x3b4], 0x10
lea eax, [ebp - 0x3c8]
push 1
cmovae eax, dword [ebp - 0x3c8]
push 0x5d5094
push ecx
push eax
push ecx
push dword [ebp - 0x414]
lea ecx, [ebp - 0x410]
call fcn.0040c490
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x410]
call fcn.00407880
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x3f8], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x3e8], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x3fc]
cmp ecx, 0x10
jb 0x40f3b5
mov edx, dword [ebp - 0x410]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f3ab
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fc9f
push ecx
push edx
call fcn.005638e9
add esp, 8
cmp dword [ebp - 0x3e4], 0x10
lea eax, [ebp - 0x3f8]
mov esi, dword [ebp - 0x3f8]
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x400], 0
cmovae eax, esi
mov dword [ebp - 0x3fc], 0xf
mov byte [ebp - 0x410], 0
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f410
test dl, dl
je 0x40f40c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f410
add eax, 2
add ecx, 2
test dl, dl
jne 0x40f3f0
xor eax, eax
jmp 0x40f415
sbb eax, eax
or eax, 1
test eax, eax
je 0x40fc12
xorps xmm0, xmm0
mov dword [ebp - 0x388], 0
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x384], 0
movups xmmword [ebp - 0x398], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f444
sub ecx, edx
lea eax, [ebp - 0x118]
push ecx
push eax
lea ecx, [ebp - 0x398]
call fcn.00408580
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x384]
mov eax, ecx
mov edx, dword [ebp - 0x388]
sub eax, edx
cmp eax, 0x1b
jb 0x40f506
cmp ecx, 0x10
lea esi, [ebp - 0x398]
lea eax, [edx + 0x1b]
cmovae esi, dword [ebp - 0x398]
mov dword [ebp - 0x388], eax
cmp esi, 0x5d5267
jae 0x40f4be
lea eax, [esi + edx]
cmp eax, str._echo_off_r_nset__sourceFile
jb 0x40f4be
cmp esi, str._echo_off_r_nset__sourceFile
ja 0x40f4b4
xor edi, edi
jmp 0x40f4c3
mov edi, esi
sub edi, str._echo_off_r_nset__sourceFile
jmp 0x40f4c3
mov edi, 0x1b
lea eax, [edx + 1]
push eax
lea ecx, [esi + 0x1b]
push esi
push ecx
call fcn.005655a0
add esp, 0xc
push edi
push str._echo_off_r_nset__sourceFile
push esi
call fcn.005655a0
add esp, 0xc
lea ecx, [esi + edi]
mov eax, 0x1b
sub eax, edi
push eax
lea eax, [edi + 0x5d5267]
push eax
push ecx
call fcn.005655a0
add esp, 0xc
lea eax, [ebp - 0x398]
jmp 0x40f525
push 0x1b
sub esp, 8
mov byte [ebp - 0x414], 0
lea ecx, [ebp - 0x398]
push dword [ebp - 0x414]
push 0x1b
call fcn.00412c50
mov dword [ebp - 0x370], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x380], xmm0
mov dword [ebp - 0x36c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x380], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x370], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x36c]
mov eax, edx
mov ecx, dword [ebp - 0x370]
sub eax, ecx
push 0x15
push str.__r_nset__targetFolder
cmp eax, 0x15
jb 0x40f5bb
cmp edx, 0x10
lea esi, [ebp - 0x380]
lea eax, [ecx + 0x15]
cmovae esi, dword [ebp - 0x380]
add esi, ecx
mov dword [ebp - 0x370], eax
push esi
call fcn.005655a0
add esp, 0xc
mov byte [esi + 0x15], 0
lea eax, [ebp - 0x380]
jmp 0x40f5d5
mov byte [ebp - 0x414], 0
lea ecx, [ebp - 0x380]
push dword [ebp - 0x414]
push 0x15
call fcn.004078f0
mov dword [ebp - 0x358], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x368], xmm0
mov dword [ebp - 0x354], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x368], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x358], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x3c8]
cmp dword [ebp - 0x3b4], 0x10
mov esi, dword [ebp - 0x354]
mov eax, esi
cmovae ecx, dword [ebp - 0x3c8]
mov edx, dword [ebp - 0x358]
sub eax, edx
mov edi, dword [ebp - 0x3b8]
push edi
push ecx
cmp edi, eax
ja 0x40f680
lea eax, [edx + edi]
cmp esi, 0x10
mov dword [ebp - 0x358], eax
lea eax, [ebp - 0x368]
cmovae eax, dword [ebp - 0x368]
lea esi, [eax + edx]
push esi
call fcn.005655a0
add esp, 0xc
mov byte [esi + edi], 0
lea eax, [ebp - 0x368]
jmp 0x40f699
mov byte [ebp - 0x414], 0
lea ecx, [ebp - 0x368]
push dword [ebp - 0x414]
push edi
call fcn.004078f0
mov dword [ebp - 0x340], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x350], xmm0
mov dword [ebp - 0x33c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x350], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x340], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x33c]
mov eax, edx
mov ecx, dword [ebp - 0x340]
sub eax, ecx
push 0x13
push str.__r_n_r_nset__onlyFile
cmp eax, 0x13
jb 0x40f72f
cmp edx, 0x10
lea esi, [ebp - 0x350]
lea eax, [ecx + 0x13]
cmovae esi, dword [ebp - 0x350]
add esi, ecx
mov dword [ebp - 0x340], eax
push esi
call fcn.005655a0
add esp, 0xc
mov byte [esi + 0x13], 0
lea eax, [ebp - 0x350]
jmp 0x40f749
mov byte [ebp - 0x414], 0
lea ecx, [ebp - 0x350]
push dword [ebp - 0x414]
push 0x13
call fcn.004078f0
mov dword [ebp - 0x3a0], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x3b0], xmm0
mov dword [ebp - 0x39c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x3b0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x3a0], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x3b0]
call fcn.00407880
mov dword [ebp - 0x328], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x338], xmm0
mov dword [ebp - 0x324], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x338], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x328], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x324]
mov eax, edx
mov ecx, dword [ebp - 0x328]
sub eax, ecx
push 0x15d
push str.__r_n_r_nif_not_exist___sourceFile_____r_n____pause_r_n____exit_r_n__r_n_r_nif_not_exist___targetFolder_____r_n____mkdir___targetFolder___r_n__r_n_r_ncopy___sourceFile_____targetFolder__onlyFile___r_n_r_ntaskkill__f__im___onlyFile___r_n_r_n:delExe_r_nif_not_exist__sourceFile__goto_done_r_ndel__f__q__sourceFile__r_ngoto_delExe_r_n_r_n:done_r_n_r_nstart______targetFolder__onlyFile___r_n_r_nexit
cmp eax, 0x15d
jb 0x40f846
cmp edx, 0x10
lea esi, [ebp - 0x338]
lea eax, [ecx + 0x15d]
cmovae esi, dword [ebp - 0x338]
add esi, ecx
mov dword [ebp - 0x328], eax
push esi
call fcn.005655a0
add esp, 0xc
mov byte [esi + 0x15d], 0
lea eax, [ebp - 0x338]
jmp 0x40f863
mov byte [ebp - 0x414], 0
lea ecx, [ebp - 0x338]
push dword [ebp - 0x414]
push 0x15d
call fcn.004078f0
mov dword [ebp - 0x3d0], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x3e0], xmm0
mov dword [ebp - 0x3cc], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x3e0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x3d0], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x324]
cmp ecx, 0x10
jb 0x40f8e7
mov edx, dword [ebp - 0x338]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f8dd
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca4
push ecx
push edx
call fcn.005638e9
add esp, 8
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x324], 0xf
mov byte [ebp - 0x338], 0
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x39c]
cmp ecx, 0x10
jb 0x40f940
mov edx, dword [ebp - 0x3b0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f936
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca4
push ecx
push edx
call fcn.005638e9
add esp, 8
mov dword [ebp - 0x3a0], 0
mov dword [ebp - 0x39c], 0xf
mov byte [ebp - 0x3b0], 0
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x33c]
cmp ecx, 0x10
jb 0x40f999
mov edx, dword [ebp - 0x350]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f98f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca4
push ecx
push edx
call fcn.005638e9
add esp, 8
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x33c], 0xf
mov byte [ebp - 0x350], 0
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x354]
cmp ecx, 0x10
jb 0x40f9f2
mov edx, dword [ebp - 0x368]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f9e8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca4
push ecx
push edx
call fcn.005638e9
add esp, 8
mov dword [ebp - 0x358], 0
mov dword [ebp - 0x354], 0xf
mov byte [ebp - 0x368], 0
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x36c]
cmp ecx, 0x10
jb 0x40fa4b
mov edx, dword [ebp - 0x380]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40fa41
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca4
push ecx
push edx
call fcn.005638e9
add esp, 8
mov dword [ebp - 0x370], 0
mov dword [ebp - 0x36c], 0xf
mov byte [ebp - 0x380], 0
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x384]
cmp ecx, 0x10
jb 0x40faa4
mov edx, dword [ebp - 0x398]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40fa9a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca4
push ecx
push edx
call fcn.005638e9
add esp, 8
sub esp, 8
mov dword [ebp - 0x388], 0
lea eax, [ebp - 0x320]
mov dword [ebp - 0x384], 0xf
lea ecx, [ebp - 0x4c8]
mov byte [ebp - 0x398], 0
push 2
push eax
call fcn.0040b8f0
mov byte [ebp - 4], 0x11
cmp dword [ebp - 0x478], 0
je 0x40fb3a
cmp dword [ebp - 0x3cc], 0x10
lea edx, [ebp - 0x3e0]
lea ecx, [ebp - 0x4c8]
cmovae edx, dword [ebp - 0x3e0]
call fcn.0040bf70
lea ecx, [ebp - 0x4c4]
call fcn.00405fb0
test eax, eax
jne 0x40fb3a
mov eax, dword [ebp - 0x4c8]
lea ecx, [ebp - 0x4c8]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00408230
push 0
push 0
push 0
lea eax, [ebp - 0x320]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov eax, dword [ebp - 0x4c8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x4c8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4cc], eax
lea ecx, [ebp - 0x4c4]
call fcn.004055d0
mov eax, dword [ebp - 0x4c8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x4c8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x4cc], eax
lea eax, [ebp - 0x460]
mov byte [ebp - 4], 0x12
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00417994
mov ecx, dword [ebp - 0x3cc]
add esp, 4
cmp ecx, 0x10
jb 0x40fc0c
mov edx, dword [ebp - 0x3e0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40fc02
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fca9
push ecx
push edx
call fcn.005638e9
add esp, 8
mov esi, dword [ebp - 0x3f8]
mov eax, dword [ebp - 0x3e4]
cmp eax, 0x10
jb 0x40fc44
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x40fc3a
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fcae
push ecx
push esi
call fcn.005638e9
add esp, 8
mov eax, dword [ebp - 0x3b4]
cmp eax, 0x10
jb 0x40fc7c
mov edx, dword [ebp - 0x3c8]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40fc72
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fcae
push ecx
push edx
call fcn.005638e9
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005638db
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004083e0
call fcn.00568e05
call fcn.00568e05
call fcn.00568e05
call fcn.00568e05
int3