Function at 0x4704f0
Capabilities:
Delete file
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x214]
push ebx
mov ebx, dword fs:[0x18]
sub esp, 0x354
mov byte [ebp - 0x329], 0
mov dword [ebp - 0x32d], 0x74536554
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8ad
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], 0x598124
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.0045bef0
lea eax, [ebp - 0x110]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59bb2d
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
sub esp, 0x10
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8af
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x598160
call fcn.0045bef0
lea eax, [ebp - 0x110]
mov dword [esp + 0x18], 0
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [ebp - 0x33c], eax
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8b4
mov eax, dword [ebx + 0x34]
lea ebx, [ebp - 0x314]
mov dword [esp + 4], str.CreateFileA_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
xor eax, eax
nop
mov byte [ebx + eax], al
add eax, 1
cmp eax, 0x100
jne 0x470630
lea eax, [ebp - 0x334]
mov edi, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x100
mov dword [esp], esi
call edi
sub esp, 0x14
mov dword [ebp - 0x338], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov ecx, dword fs:[0x18]
mov dword [eax + 4], 0x8b8
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x340], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5981d0
mov edx, dword [ebp - 0x338]
mov dword [esp], edx
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8b9
mov eax, dword [ebp - 0x334]
mov dword [esp + 4], str.expected_number_of_bytes_written__lu_n
cmp eax, 0x100
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x328]
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x320], 0x10
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x334]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x32d]
mov dword [esp + 8], 5
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 0x14
mov edx, eax
test eax, eax
jne 0x470758
mov ecx, dword [ebp - 0x340]
cmp dword [ecx + 0x34], 0x57
je 0x470937
mov dword [ebp - 0x338], edx
call fcn.0057d110
mov dword [eax], 0x597dfd
mov ecx, dword fs:[0x18]
mov dword [eax + 4], 0x8c1
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x344], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5981d0
mov edx, dword [ebp - 0x338]
mov dword [esp], edx
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8c2
mov eax, dword [ebp - 0x334]
mov dword [esp + 4], str.expected_number_of_bytes_written__lu_n
cmp eax, 5
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [sym.imp.kernel32.dll_SetFilePointer]
mov dword [esp], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x340], edx
call edx
sub esp, 0x10
mov dword [ebp - 0x338], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8c4
mov eax, dword [ebp - 0x338]
mov dword [esp + 4], str.wrong_file_offset__ld_n
cmp eax, 0x15
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
lea eax, [ebp - 0x328]
mov dword [ebp - 0x320], 0x200
mov dword [ebp - 0x31c], 0
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x334]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x32d]
mov dword [esp + 8], 5
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 0x14
mov edi, eax
call fcn.0057d110
mov ecx, dword [ebp - 0x344]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8c9
mov eax, dword [ecx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5981d0
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8ca
mov eax, dword [ebp - 0x334]
mov dword [esp + 4], str.expected_number_of_bytes_written__lu_n
cmp eax, 5
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
mov edx, dword [ebp - 0x340]
call edx
sub esp, 0x10
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8cc
xor eax, eax
cmp edi, 0x205
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], str.wrong_file_offset__ld_n
mov dword [esp], eax
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], esi
mov edi, ebx
mov dword [ebp - 0x338], eax
call eax
lea eax, [ebp - 0x110]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
mov eax, dword [ebp - 0x33c]
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8d4
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x33c], edx
mov dword [esp + 4], str.CreateFileA_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
xor eax, eax
mov ecx, 0x40
mov dword [ebp - 0x328], 0
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x328]
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x320], 0x10
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x334]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 5
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov ebx, eax
test eax, eax
jne 0x470a4d
mov edx, dword [ebp - 0x33c]
cmp dword [edx + 0x34], 0x57
je 0x470b3d
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8dd
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.ReadFile_error__ld_n
mov dword [esp + 8], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8de
mov eax, dword [ebp - 0x334]
mov dword [esp + 4], str.expected_number_of_bytes_read__lu_n
cmp eax, 5
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x10
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8e0
xor eax, eax
cmp ebx, 0x15
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.wrong_file_offset__ld_n
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8e1
mov eax, dword [ebp - 0x32d]
cmp dword [ebp - 0x314], eax
je 0x470b96
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.pattern_match_failed_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], esi
mov eax, dword [ebp - 0x338]
call eax
lea eax, [ebp - 0x110]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x8e7
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.DeleteFileA_error__ld_n
mov dword [esp + 8], eax
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [ebp - 0x329]
cmp byte [ebp - 0x310], al
jne 0x470b25
xor eax, eax
jmp 0x470b2a