Function at 0x401000
Capabilities:
Create directory
Delete directory
Delete file
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0x7c
push 0
push 0x40345c
call sub.CRTDLL.dll_memset
add esp, 0xc
push 0
call sub.KERNEL32.dll_GetModuleHandleA
mov dword [0x403460], eax
push 0
push 0x1000
push 0
call sub.KERNEL32.dll_HeapCreate
mov dword [0x40345c], eax
call fcn.00402370
call fcn.00402310
call fcn.004022f8
call fcn.004020f0
push 8
push 0x403040
push 4
mov eax, 0x4034d0
call fcn.00404000
call fcn.0040226d
mov dword [0x4034ac], eax
push dword [0x4034d8]
push 1
call fcn.00402219
sub esp, 4
lea ecx, [0x403490]
pop edx
call fcn.00402000
push 0x1000
call fcn.004016d3
mov dword [0x403468], eax
push dword [0x4034d8]
push 0x200
call fcn.004020c0
sub esp, 4
lea ecx, [0x4034b0]
pop edx
call fcn.00402000
mov ebx, dword [0x4034ac]
cmp ebx, 3
jle 0x40118f
mov dword [0x403470], 3
mov ebx, dword [0x4034ac]
dec ebx
cmp ebx, dword [0x403470]
jl 0x40118f
push dword [0x4034d8]
push dword [0x403470]
call fcn.00402219
sub esp, 4
lea ecx, [0x4034a8]
pop edx
call fcn.00402000
push dword [0x4034a8]
call sub.SHLWAPI.dll_PathQuoteSpacesA
mov edx, dword [0x4034a8]
push dword [0x4034d8]
call fcn.004023c0
mov edx, 0x40302e
call fcn.004023c0
lea ecx, [0x4034a8]
pop edx
call fcn.00402000
push dword [0x4034a8]
call sub.KERNEL32.dll_lstrlenA
mov dword [0x4034a0], eax
push dword [0x4034a0]
mov eax, dword [0x4034a8]
push eax
mov ebx, dword [0x403468]
add ebx, dword [0x40349c]
push ebx
call sub.CRTDLL.dll_memcpy
add esp, 0xc
mov ebx, dword [0x40349c]
add ebx, dword [0x4034a0]
mov dword [0x40349c], ebx
inc dword [0x403470]
jmp 0x4010dc
mov dword [0x403470], 0
mov dword [0x4034a0], 0
push dword [0x4034d8]
push 0x100
call fcn.004020c0
sub esp, 4
lea ecx, [0x4034b4]
pop edx
call fcn.00402000
push 0x100
push dword [0x4034b4]
push 0
call sub.KERNEL32.dll_GetModuleFileNameA
push dword [0x4034d8]
push 0x200
call fcn.004020c0
sub esp, 4
lea ecx, [0x4034c0]
pop edx
call fcn.00402000
mov eax, dword [0x4034c0]
push eax
push 0x200
call sub.KERNEL32.dll_GetTempPathA
push dword [0x4034d8]
push 0x200
call fcn.004020c0
sub esp, 4
lea ecx, [0x4034bc]
pop edx
call fcn.00402000
push dword [0x4034c0]
call sub.SHLWAPI.dll_PathAddBackslashA
push dword [0x4034bc]
push 0
push 0x40302d
push dword [0x4034c0]
call sub.KERNEL32.dll_GetTempFileNameA
push dword [0x4034bc]
call sub.CRTDLL.dll_remove
add esp, 4
mov edx, dword [0x4034bc]
push dword [0x4034d8]
call fcn.004023c0
lea ecx, [0x40348c]
pop edx
call fcn.00402000
push dword [0x40348c]
call sub.CRTDLL.dll__mkdir
add esp, 4
push 0
push pe_nt_image_headers32
push 3
push 0
push 0
push 0x80000000
push dword [0x4034b4]
call sub.KERNEL32.dll_CreateFileA
mov dword [0x403488], eax
push 0
push dword [0x403488]
call sub.KERNEL32.dll_GetFileSize
mov dword [0x4034a0], eax
push dword [0x4034a0]
call fcn.004016d3
mov dword [0x403464], eax
push 0
push 0x40347c
push dword [0x4034a0]
push dword [0x403464]
push dword [0x403488]
call sub.KERNEL32.dll_ReadFile
push dword [0x403488]
call sub.KERNEL32.dll_CloseHandle
push 4
mov ebx, dword [0x403464]
add ebx, dword [0x4034a0]
add ebx, 0xfffffffc
push ebx
push 0x403470
call sub.CRTDLL.dll_memcpy
add esp, 0xc
push dword [0x403470]
call fcn.004016d3
mov dword [0x4034a4], eax
push dword [0x403470]
call fcn.004016d3
mov dword [0x4034c4], eax
push dword [0x4034d8]
push 0x100
call fcn.004020c0
sub esp, 4
lea ecx, [0x403494]
pop edx
call fcn.00402000
push dword [0x403470]
mov ebx, dword [0x403464]
add ebx, dword [0x4034a0]
sub ebx, dword [0x403470]
add ebx, 0xfffffffc
push ebx
push dword [0x4034a4]
call sub.CRTDLL.dll_memcpy
add esp, 0xc
push dword [0x403464]
call sub.CRTDLL.dll_free
add esp, 4
push dword [0x40348c]
call sub.CRTDLL.dll__chdir
add esp, 4
push 4
mov ebx, dword [0x4034a4]
add ebx, dword [0x403498]
push ebx
push 0x403474
call sub.CRTDLL.dll_memcpy
add esp, 0xc
push 0x64
mov ebx, dword [0x4034a4]
add ebx, dword [0x403498]
add ebx, 4
push ebx
mov eax, dword [0x403494]
push eax
call sub.CRTDLL.dll_memcpy
add esp, 0xc
push dword [0x403494]
call sub.SHLWAPI.dll_PathRemoveBlanksA
mov eax, 0x4034d0
call fcn.00404040
mov edx, dword [0x403494]
push dword [0x4034d8]
call fcn.004023c0
mov ebp, dword [0x4034d4]
lea ecx, [ebp + 8]
pop edx
call fcn.00402000
push dword [0x403494]
mov edx, 0x40302d
pop ecx
call fcn.00404240
je 0x401439
jmp 0x401501
mov ebx, dword [0x4034cc]
cmp ebx, 1
jne 0x401454
push dword [0x403490]
call sub.CRTDLL.dll__chdir
add esp, 4
jmp 0x40145e
mov dword [0x4034cc], 1
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0x40000000
push dword [0x403494]
call sub.KERNEL32.dll_CreateFileA
mov dword [0x403488], eax
push 0
push 0x403480
push dword [0x403474]
mov ebx, dword [0x4034a4]
add ebx, dword [0x403498]
add ebx, 0x68
push ebx
push dword [0x403488]
call sub.KERNEL32.dll_WriteFile
push dword [0x403488]
call sub.KERNEL32.dll_CloseHandle
push 0x100
push dword [0x403494]
call fcn.00402008
mov ebx, dword [0x403498]
add ebx, dword [0x403474]
add ebx, 0x68
mov dword [0x403498], ebx
mov ebx, dword [0x403498]
mov edi, dword [0x403470]
add edi, 0xfffffffc
cmp ebx, edi
jl 0x4014fc
jmp 0x401501
jmp 0x4013aa
push dword [0x403490]
call sub.CRTDLL.dll__chdir
add esp, 4
mov eax, 0x4034d0
call fcn.004040b0
mov ebp, dword [0x4034d4]
mov edx, dword [ebp + 8]
push dword [0x4034d8]
call fcn.004023c0
lea ecx, [0x403478]
pop edx
call fcn.00402000
push dword [0x40348c]
call sub.SHLWAPI.dll_PathAddBackslashA
push dword [0x403478]
mov edx, str.batchfile.bat
pop ecx
call fcn.00404240
je 0x401561
mov dword [0x4034c8], 1
push dword [0x4034d8]
push dword [0x403468]
call fcn.00402330
sub esp, 4
lea ecx, [0x403484]
pop edx
call fcn.00402000
push dword [0x403468]
call sub.CRTDLL.dll_free
add esp, 4
push dword [0x4034d8]
push dword [0x4034c8]
push dword [0x403484]
push dword [0x403490]
mov edx, dword [0x40348c]
push dword [0x4034d8]
call fcn.004023c0
mov edx, dword [0x403478]
call fcn.004023c0
mov edx, dword [0x403048]
add dword [esp], edx
call fcn.004016ff
pop dword [0x4034d8]
push dword [0x403490]
call sub.SHLWAPI.dll_PathAddBackslashA
mov eax, 0x4034d0
call fcn.004040d0
mov eax, 0x4034d0
call fcn.004040f0
or eax, eax
je 0x40168f
mov ebx, dword [0x4034b8]
cmp ebx, 1
jne 0x401647
push dword [0x4034d8]
mov edx, dword [0x403490]
push dword [0x4034d8]
call fcn.004023c0
mov ebp, dword [0x4034d4]
mov edx, dword [ebp + 8]
call fcn.004023c0
mov edx, dword [0x403048]
add dword [esp], edx
call sub.CRTDLL.dll_remove
add esp, 4
pop dword [0x4034d8]
jmp 0x40168a
push dword [0x4034d8]
mov edx, dword [0x40348c]
push dword [0x4034d8]
call fcn.004023c0
mov edx, dword [0x403478]
call fcn.004023c0
mov edx, dword [0x403048]
add dword [esp], edx
call sub.CRTDLL.dll_remove
add esp, 4
pop dword [0x4034d8]
mov dword [0x4034b8], 1
jmp 0x4015ec
push dword [0x40348c]
call sub.CRTDLL.dll__rmdir
add esp, 4
push dword [0x4034b4]
push dword [0x4034c0]
call fcn.004017d8
push 0
call 0x4016c8
push dword [0x40345c]
call sub.KERNEL32.dll_HeapDestroy
call sub.KERNEL32.dll_ExitProcess
call fcn.0040230c
call fcn.00402324
ret