Function at 0x402eb0
Capabilities:
Delete file
Read file on windows

Disassembly:
sub esp, 0x14c
push ebx
push ebp
push esi
push edi
push 0x406774
mov dword [esp + 0x14], 0xffffffff
call sub.libwpwr.dll_wpwrLogMsg
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x18]
mov ebx, dword [sym.imp.MSVCRT.dll__stat]
rep stosd dword es:[edi], eax
mov ecx, 9
lea edi, [esp + 0x3c]
add esp, 4
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
push 0x406af8
call ebx
add esp, 8
lea ecx, [esp + 0x38]
mov esi, eax
push ecx
push 0x406bf8
call ebx
mov ebp, dword [sym.imp.MSVCRT.dll_remove]
add esp, 8
test eax, eax
jne 0x402f68
mov edi, 0x406bf8
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x5c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 9
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push edx
call ebx
add esp, 8
lea eax, [esp + 0x5c]
push eax
call ebp
add esp, 4
jmp 0x40300d
test esi, esi
lea edx, [esp + 0x5c]
mov edi, 0x406af8
jne 0x402f94
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40300d
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x406af8
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00403360
add esp, 4
test eax, eax
je 0x402ffe
mov eax, dword [0x4069ec]
test eax, eax
jne 0x403043
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
lea ecx, [esp + 0x14]
lea edx, [esp + 0x5c]
push ecx
push edx
call ebx
add esp, 8
lea eax, [esp + 0x5c]
push 0x406cf8
push eax
call fcn.00402b70
add esp, 8
test eax, eax
je 0x40305f
mov eax, dword [0x4069ec]
test eax, eax
jne 0x403043
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
lea ecx, [esp + 0x5c]
push ecx
call ebp
add esp, 4
test eax, eax
je 0x4030ea
mov eax, dword [0x4069ec]
test eax, eax
jne 0x40308d
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
push 0x406cf8
call ebp
mov esi, dword [sym.imp.MSVCRT.dll__errno]
add esp, 4
call esi
mov edx, dword [eax]
push edx
call dword [sym.imp.MSVCRT.dll_strerror]
add esp, 4
test eax, eax
jne 0x4030c1
mov eax, 0x406688
push eax
lea eax, [esp + 0x60]
push eax
push 0x406758
call sub.libwpwr.dll_wpwrLogErr
add esp, 0xc
call esi
mov dword [eax], 0x10022
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
push 0x406af8
call fcn.00403360
add esp, 4
test eax, eax
je 0x40315c
mov eax, dword [0x4069ec]
test eax, eax
jne 0x40311b
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
push 0x406cf8
call ebp
mov esi, dword [sym.imp.MSVCRT.dll__errno]
add esp, 4
call esi
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_strerror]
add esp, 4
test eax, eax
jne 0x40314f
mov eax, 0x406688
push eax
push 0x406af8
push 0x4066b8
jmp 0x4031ca
push 0x406714
push 0x406cf8
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4031e9
mov eax, dword [0x4069ec]
test eax, eax
jne 0x403195
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
mov esi, dword [sym.imp.MSVCRT.dll__errno]
add esp, 4
call esi
mov edx, dword [eax]
push edx
call dword [sym.imp.MSVCRT.dll_strerror]
add esp, 4
test eax, eax
jne 0x4031bf
mov eax, 0x406688
push eax
push 0x406cf8
push 0x406718
call sub.libwpwr.dll_wpwrLogErr
add esp, 0xc
call esi
mov dword [eax], 0x10022
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
mov eax, dword [esp + 0x28]
push 1
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x403279
mov eax, dword [0x4069ec]
test eax, eax
jne 0x403220
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
mov esi, dword [sym.imp.MSVCRT.dll__errno]
add esp, 4
call esi
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_strerror]
add esp, 4
test eax, eax
jne 0x403254
mov eax, 0x406688
push eax
push 0x406754
call sub.libwpwr.dll_wpwrLogErr
add esp, 8
call esi
mov dword [eax], 0x10023
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
mov edx, dword [esp + 0x28]
push esi
push edx
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x38]
add esp, 0x10
cmp eax, ecx
je 0x403304
mov eax, dword [0x4069ec]
test eax, eax
jne 0x4032b3
push 1
call sub.libwpwr.dll_wpwrVerboseModeSet
add esp, 4
push 0x406774
call sub.libwpwr.dll_wpwrLogMsg
add esp, 4
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push 0x4064e0
call sub.libwpwr.dll_wpwrLogRaw
mov esi, dword [sym.imp.MSVCRT.dll__errno]
add esp, 4
call esi
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_strerror]
add esp, 4
test eax, eax
jne 0x4032e7
mov eax, 0x406688
push eax
push 0x406cf8
push 0x406718
call sub.libwpwr.dll_wpwrLogErr
add esp, 0xc
call esi
mov dword [eax], 0x10022
jmp 0x403346
push ebx
call fcn.00403450
add esp, 4
mov edi, eax
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test edi, edi
je 0x403327
push 0x406cf8
call ebp
add esp, 4
push 0x406414
call sub.libwpwr.dll_wpwrLogRaw
add esp, 4
mov dword [0x4069e0], 1
mov dword [esp + 0x10], 0
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret