Function at 0x402c0f
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x340
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov esi, ecx
push 0x80
push 3
push ebx
lea eax, [esi + 0x20]
push 1
push 0x80000000
push eax
mov dword [ebp - 0x18], esi
call edi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x403133
cmp eax, 0xffffffff
je 0x403133
lea eax, [ebp - 0x23c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x23c]
push 0x41a0dc
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push 0x80
push 2
push ebx
push ebx
lea eax, [ebp - 0x23c]
push 0x40000000
push eax
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x402c9a
cmp eax, 0xffffffff
jne 0x402cd3
lea eax, [ebp - 0x23c]
push eax
call fcn.0040c359
pop ecx
lea eax, [ebp - 0x23c]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x403100
cmp eax, 0xffffffff
je 0x403100
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x100000
mov dword [ebp - 0x14], eax
call fcn.0040c47a
mov edi, eax
pop ecx
cmp edi, ebx
jne 0x402d01
push ebx
push 0x41a09c
push 0x41a2f4
jmp 0x403159
mov ecx, dword [ebp - 0x14]
mov eax, 0x100000
cmp ecx, eax
mov dword [ebp - 0xc], eax
ja 0x402d13
mov dword [ebp - 0xc], ecx
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402d6c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040c391
pop ecx
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x138]
push 0x41a2dc
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x138]
push ebx
push 0x41a09c
jmp 0x403158
movzx eax, byte [edi]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push ebx
push eax
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff8
push eax
lea eax, [edi + 8]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402dd5
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040c391
pop ecx
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x138]
push 0x41a2c0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x138]
push ebx
push 0x41a09c
jmp 0x403158
mov eax, dword [ebp - 0x14]
lea ecx, [eax - 8]
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff8
mov dword [ebp - 0x14], ecx
cmp eax, ecx
mov dword [ebp - 0x10], eax
jae 0x402e3f
mov ecx, dword [ebp - 0x14]
mov eax, 0x100000
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp ecx, eax
ja 0x402e00
mov dword [ebp - 0xc], ecx
add dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402ebd
lea eax, [ebp - 0x24]
push ebx
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402f00
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
jb 0x402deb
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call fcn.0040c391
mov eax, dword [ebp - 0x1c]
pop ecx
cmp eax, ebx
jbe 0x403049
dec eax
mov dword [ebp - 0x14], ebx
cmp eax, ebx
mov dword [ebp - 0x28], eax
jbe 0x403049
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x18]
add eax, 0x20
push eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
cmp eax, ebx
jle 0x402ea9
cmp byte [ebp + eax - 0x138], 0x2e
jne 0x402e93
mov byte [ebp + eax - 0x138], bl
cmp dword [ebp - 0x10], 0xa
jae 0x402f46
push str..wp00
jmp 0x402f58
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040c391
pop ecx
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x138]
push 0x41a2dc
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x138]
push ebx
push 0x41a09c
jmp 0x403158
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040c391
pop ecx
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x138]
push 0x41a2c0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x138]
push ebx
push 0x41a09c
jmp 0x403158
cmp dword [ebp - 0x10], 0x64
jae 0x402f53
push str..wp0
jmp 0x402f58
push 0x41a0c8
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x34]
push 0xa
push eax
push dword [ebp - 0x10]
call fcn.00416a1b
add esp, 0xc
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x138]
push 0x80000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x402fe1
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x1c]
call fcn.0040211d
test eax, eax
je 0x403070
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x138]
push 0x80000000
push eax
jmp 0x402fa4
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x1c], eax
call fcn.0040c47a
mov edi, eax
pop ecx
cmp edi, ebx
push ebx
je 0x40307a
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x1c]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 4]
test eax, eax
je 0x403086
call esi
lea eax, [ebp - 0x20]
push ebx
push eax
push dword [ebp - 0x1c]
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4030be
push edi
call fcn.0040c391
inc dword [ebp - 0x14]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, dword [ebp - 0x28]
jb 0x402e72
push dword [ebp - 8]
call esi
lea eax, [ebp - 0x23c]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x1c]
add eax, 0x32c
push eax
call fcn.0040bd70
pop ecx
pop ecx
push 1
pop eax
jmp 0x403164
push dword [ebp - 8]
call esi
jmp 0x403162
push 0x41a09c
push 0x41a284
jmp 0x4030f8
call esi
push dword [ebp - 8]
call esi
push edi
call fcn.0040c391
pop ecx
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x340]
push 0x41a2dc
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x340]
push ebx
push 0x41a09c
jmp 0x4030f7
push dword [ebp - 4]
call esi
push dword [ebp - 8]
call esi
push edi
call fcn.0040c391
pop ecx
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x340]
push 0x41a2c0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x340]
push ebx
push 0x41a09c
push eax
mov eax, dword [ebp - 0x18]
push dword [eax + 4]
jmp 0x40315c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x340]
push 0x41a264
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x340]
push ebx
push 0x41a09c
jmp 0x403158
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x340]
push 0x41a084
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x340]
push ebx
push 0x41a09c
push eax
push dword [esi + 4]
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret