Function at 0x402770
Capabilities:
Delete file
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40a68a
mov eax, dword fs:[0]
push eax
mov eax, 0x1070
mov dword fs:[0], esp
call fcn.004035a0
mov eax, dword [0x40e0d0]
push ebx
push ebp
push esi
mov dword [esp + 0x1078], eax
push edi
xor esi, esi
mov dword [esp + 0x1088], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
mov eax, dword [0x40ecdc]
mov ecx, 0x40ecdc
mov byte [esp + 0x1088], 2
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov edx, dword [0x40ecdc]
mov ecx, 0x40ecdc
mov byte [esp + 0x1088], 3
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x34], eax
mov eax, dword [0x40ecdc]
mov ecx, 0x40ecdc
mov byte [esp + 0x1088], 4
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x28], eax
mov ecx, dword [0x40ed30]
cmp ecx, esi
mov bl, 5
mov byte [esp + 0x1088], bl
jne 0x40281c
xor eax, eax
jmp 0x40282a
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402821
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.00401e80
push str..unprotected
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00402450
add esp, 0xc
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x108c], 6
call fcn.00402330
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x1088], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402883
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
mov ecx, 0xb
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [esp + 0x28]
push ecx
lea ebp, [edi - 0x10]
mov dword [esp + 0x1c], esp
mov esi, esp
push ebp
mov dword [esp + 0x20], ebp
call fcn.00401b90
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004025e0
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x10], esi
jne 0x402b95
mov ecx, dword [esp + 0x1090]
lea eax, [esp + 0x6c]
push eax
push ecx
call fcn.00402010
add esp, 8
push esi
push 0x80
push 3
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, 1
push ebx
push 0x80000000
push edi
call esi
cmp eax, 0xffffffff
jne 0x402908
call fcn.00402090
mov edi, eax
jmp 0x40290e
mov dword [esp + 0x14], eax
xor edi, edi
mov edx, dword [esp + 0x20]
push 0
push 2
push 2
push 0
push 0
push 0x40000000
push edx
call esi
cmp eax, 0xffffffff
jne 0x402932
call fcn.00402090
mov esi, eax
jmp 0x402938
mov dword [esp + 0x1c], eax
xor esi, esi
test edi, edi
jne 0x402b74
test esi, esi
jne 0x402b74
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x18]
call fcn.00402180
test eax, eax
jne 0x402b74
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
sub ecx, 0x2e
push eax
sbb edx, eax
push edx
push ecx
lea ecx, [esp + 0x20]
call fcn.004020e0
test eax, eax
jne 0x402b08
lea eax, [esp + 0x24]
push eax
push 0x2e
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x20]
call fcn.004020b0
test eax, eax
jne 0x402b08
mov edx, dword [esp + 0x66]
push eax
mov eax, dword [esp + 0x66]
push edx
push eax
lea ecx, [esp + 0x20]
call fcn.004020e0
test eax, eax
jne 0x402b08
jmp 0x4029c0
mov cl, byte [esp + eax + 0x6c]
cmp cl, byte [esp + eax + 0x4a]
jne 0x402a05
inc eax
cmp eax, 0x10
jb 0x4029c0
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x2c]
jb 0x402a21
ja 0x4029f1
cmp ecx, dword [esp + 0x3c]
jbe 0x402a21
push 0xdd
push 4
call fcn.00402510
add esp, 8
jmp 0x402ad7
push 0xce
push 2
mov dword [esp + 0x18], 2
call fcn.00402510
add esp, 8
jmp 0x402b20
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ecx]
mov edx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x28]
push eax
push 0x1000
lea ecx, [esp + 0x88]
push ecx
push edx
call ebx
test eax, eax
jne 0x402aa0
call fcn.00402090
mov edi, eax
test edi, edi
jne 0x402aaf
mov ecx, dword [esp + 0x24]
xor eax, eax
test ecx, ecx
jbe 0x402a6e
xor byte [esp + eax + 0x7c], 0xca
inc eax
cmp eax, ecx
jb 0x402a64
mov edx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x3c]
push eax
push ecx
lea ecx, [esp + 0x88]
push ecx
push edx
call ebp
test eax, eax
jne 0x402aa4
call fcn.00402090
mov esi, eax
test esi, esi
jne 0x402aa8
cmp dword [esp + 0x24], 0x1000
je 0x402a30
jmp 0x402ac6
xor edi, edi
jmp 0x402a5a
xor esi, esi
jmp 0x402a94
push 0xf8
jmp 0x402ab4
push 0xfd
push 1
mov dword [esp + 0x18], 1
call fcn.00402510
add esp, 8
test edi, edi
jne 0x402b1c
test esi, esi
jne 0x402b1c
mov ebp, dword [esp + 0x18]
mov ebx, 1
mov eax, dword [esp + 0x5e]
mov ecx, dword [esp + 0x5a]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.00402120
test eax, eax
jne 0x402af4
mov dword [esp + 0x10], eax
jmp 0x402b20
push 0x10f
push ebx
mov dword [esp + 0x18], ebx
call fcn.00402510
add esp, 8
jmp 0x402b20
push 0x117
push ebx
mov dword [esp + 0x18], ebx
call fcn.00402510
add esp, 8
jmp 0x402b20
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
xor esi, esi
cmp eax, esi
je 0x402b35
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x402b48
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], esi
cmp dword [esp + 0x10], esi
jne 0x402b86
mov eax, dword [esp + 0x20]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00401b90
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004021e0
add esp, 4
jmp 0x402b86
push 0x12b
push ebx
mov dword [esp + 0x18], ebx
call fcn.00402510
add esp, 8
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [esp + 0x10]
mov byte [esp + 0x1088], 4
lea eax, [ebp + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402bb5
mov ecx, dword [ebp]
mov edx, dword [ecx]
push ebp
call dword [edx + 4]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x1088], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402bdb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x1088], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402c01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x402c10
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402c1f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1090]
add eax, 0xfffffff0
mov dword [esp + 0x1088], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402c4b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x1080]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x107c]
mov eax, esi
call fcn.0040360e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x107c
ret