Function at 0x404700
Capabilities:
Check if file exists
Delete file
Write file on windows

Disassembly:
sub esp, 0xa40
mov eax, dword [0x46e3d0]
xor eax, esp
mov dword [esp + 0xa3c], eax
mov eax, dword [esp + 0xa44]
push ebx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0xa50]
xor ebx, ebx
push ebp
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xa50]
mov dword [esp + 0x3c], ecx
xor ecx, ecx
cmp dword [eax + 0x18], ebx
push esi
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x18], ebx
mov dword [esp + 0x3c], ebx
mov dword [0x470f18], ebx
mov dword [0x470f1c], ebx
mov dword [esp + 0x24], ecx
jbe 0x404bfc
mov dword [esp + 0x1c], ebx
mov ebp, dword [eax + 0x1c]
add ebp, dword [esp + 0x1c]
cmp byte [ebp + 0x1a], bl
jne 0x404a15
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x2c]
push edx
lea edx, [esp + 0x3c]
push edx
lea edx, [esp + 0x3c]
push edx
lea edx, [esp + 0x4c]
push edx
lea edx, [esp + 0x2c]
push edx
lea edx, [esp + 0x44]
push edx
push ecx
mov ecx, dword [esp + 0x60]
push ecx
call fcn.004017a0
add esp, 0x24
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x404a33
push 0x1fe
lea edx, [esp + 0x84e]
push ebx
push edx
mov word [esp + 0x854], bx
call fcn.00443e10
add esp, 0xc
push 0x1fe
lea eax, [esp + 0x44e]
push ebx
push eax
mov word [esp + 0x454], bx
call fcn.00443e10
add esp, 0xc
push 0x1fe
lea ecx, [esp + 0x64e]
push ebx
push ecx
mov word [esp + 0x654], bx
call fcn.00443e10
mov ecx, dword [ebp + 0x14]
mov eax, ecx
add esp, 0xc
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x404821
push 0xff
lea edx, [esp + 0x84c]
push edx
sub eax, esi
push eax
push ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x848]
push eax
push ecx
push 0x45fb18
push 0x200
lea edx, [esp + 0x458]
push pe_nt_image_headers32
push edx
call fcn.0043ef21
lea eax, [esp + 0x460]
push eax
push str._path____s__r_n
push 0x400
lea ecx, [esp + 0x6c]
push 0x200
push ecx
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x2c
cmp edx, ebx
je 0x4048d0
lea eax, [esp + 0x48]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4048a1
sub eax, esi
push edx
sar eax, 1
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x50]
push 1
push eax
call fcn.0043fe21
mov ecx, dword [0x471b30]
push ecx
call fcn.004402ef
add esp, 0x14
cmp byte [ebp + 0x1a], bl
lea edx, [esp + 0x448]
je 0x4048df
push edx
jmp 0x4048ee
lea edi, [esp + 0x648]
call fcn.00404160
mov eax, edi
push eax
call fcn.004041d0
add esp, 4
cmp eax, ebx
je 0x404a97
lea ecx, [esp + 0x448]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40491e
lea edx, [esp + 0x448]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
lea eax, [esp + 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x404ae0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
add ecx, edx
push esi
mov eax, edi
call fcn.00404030
add esp, 4
cmp eax, edi
jne 0x404b3c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x404b98
mov ecx, dword [ebp + 8]
mov eax, dword [0x470f18]
mov edx, dword [ebp + 0xc]
add eax, ecx
mov ecx, dword [0x470f1c]
adc ecx, edx
push ecx
push eax
push str._m_nCompleteSize____d_r_n
push 0x400
mov dword [0x470f18], eax
lea eax, [esp + 0x58]
push 0x200
push eax
mov dword [0x470f1c], ecx
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x18
cmp edx, ebx
je 0x4049f4
lea eax, [esp + 0x48]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4049c6
sub eax, esi
push edx
sar eax, 1
lea ecx, [eax + eax]
push ecx
lea edx, [esp + 0x50]
push 1
push edx
call fcn.0043fe21
mov eax, dword [0x471b30]
push eax
call fcn.004402ef
add esp, 0x14
mov eax, dword [0x470f0c]
cmp eax, ebx
je 0x404a11
mov ecx, dword [0x470f18]
mov edx, dword [0x470f10]
push ebx
push ecx
push edx
call eax
add esp, 0xc
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
add dword [esp + 0x1c], 0x20
add ecx, 1
cmp ecx, dword [eax + 0x18]
mov dword [esp + 0x24], ecx
jb 0x404772
jmp 0x404bfc
push str._ExtractFile_:SzExtract_ERROR_r_n
push 0x400
lea eax, [esp + 0x50]
push 0x200
push eax
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x10
cmp edx, ebx
je 0x404bfc
lea eax, [esp + 0x48]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404a64
sub eax, esi
push edx
sar eax, 1
lea ecx, [eax + eax]
push ecx
lea edx, [esp + 0x50]
push 1
push edx
call fcn.0043fe21
mov eax, dword [0x471b30]
push eax
call fcn.004402ef
add esp, 0x14
jmp 0x404bfc
push str._ExtractFile_:
push 0x400
lea ecx, [esp + 0x50]
push 0x200
push ecx
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x10
cmp edx, ebx
je 0x404bf4
lea eax, [esp + 0x48]
lea esi, [eax + 2]
jmp 0x404ad0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404ad0
jmp 0x404bd0
push 0x45fb78
push 0x400
lea edx, [esp + 0x50]
push 0x200
push edx
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x10
cmp edx, ebx
je 0x404bf4
lea eax, [esp + 0x48]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404b11
sub eax, esi
sar eax, 1
push edx
add eax, eax
push eax
lea ecx, [esp + 0x50]
push 1
push ecx
call fcn.0043fe21
mov edx, dword [0x471b30]
push edx
jmp 0x404bec
push str._ExtractFile_:can_not_write_output_file_r_n
push 0x400
lea eax, [esp + 0x50]
push 0x200
push eax
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x10
cmp edx, ebx
je 0x404bf4
lea eax, [esp + 0x48]
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404b70
sub eax, esi
push edx
sar eax, 1
lea ecx, [eax + eax]
push ecx
lea edx, [esp + 0x50]
push 1
push edx
call fcn.0043fe21
mov eax, dword [0x471b30]
push eax
jmp 0x404bec
push str._ExtractFile_:can_not_close_output_file_r_n
push 0x400
lea ecx, [esp + 0x50]
push 0x200
push ecx
call fcn.0043ef21
mov edx, dword [0x471b30]
add esp, 0x10
cmp edx, ebx
je 0x404bf4
lea eax, [esp + 0x48]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404bc5
sub eax, esi
push edx
sar eax, 1
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x50]
push 1
push eax
call fcn.0043fe21
mov ecx, dword [0x471b30]
push ecx
call fcn.004402ef
add esp, 0x14
mov dword [esp + 0x14], 0x80004005
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
push edx
call ecx
mov ecx, dword [esp + 0xa50]
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043ef12
add esp, 0xa40
ret