Function at 0x402c19
Capabilities:
Delete file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4168f6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
push ebx
push esi
xor ebx, ebx
mov esi, edx
mov dword [esp + 0x10], ebx
push edi
mov edi, ecx
cmp byte [esi + 0x34], bl
je 0x402eef
cmp edi, ebx
je 0x402eef
push 1
push dword [ebp + 0xc]
lea eax, [esp + 0x58]
push dword [edi + 0x14]
push eax
call fcn.0040670b
add esp, 0x10
mov dword [esp + 0x94], 2
push eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x18], 4
call fcn.00402f7a
mov dword [esp + 0x94], 3
push ebx
push 1
lea ecx, [esp + 0x58]
call fcn.00403082
mov byte [esp + 0x94], 5
test byte [edi], 1
je 0x402d49
cmp dword [esp + 0x48], ebx
jne 0x402cc0
mov dword [esp + 0x10], ebx
jmp 0x402cd3
cmp dword [esp + 0x4c], 0x10
mov eax, dword [esp + 0x38]
jae 0x402ccf
lea eax, [esp + 0x38]
mov dword [esp + 0x10], eax
cmp dword [esi + 0x28], 0x10
jb 0x402cde
mov esi, dword [esi + 0x14]
jmp 0x402ce1
add esi, 0x14
push esi
lea ecx, [esp + 0x70]
call fcn.00407771
pop ecx
mov byte [esp + 0x94], 6
cmp dword [eax + 0x18], 0x10
jb 0x402cff
mov eax, dword [eax + 4]
jmp 0x402d02
add eax, 4
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.00406aca
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0xa0], 7
call fcn.00402fcf
push ebx
push 1
lea ecx, [esp + 0x20]
call fcn.00403082
push ebx
push 1
lea ecx, [esp + 0x74]
mov byte [esp + 0x9c], 5
call fcn.00403082
cmp dword [esp + 0x48], ebx
je 0x402ed4
cmp dword [edi + 4], ebx
je 0x402edc
cmp dword [esp + 0x4c], 0x10
mov eax, dword [esp + 0x38]
jae 0x402d6b
lea eax, [esp + 0x38]
push eax
call fcn.00406e6e
cmp dword [esp + 0x50], 0x10
mov eax, dword [esp + 0x3c]
pop ecx
jae 0x402d81
lea eax, [esp + 0x38]
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x402dbc
mov esi, dword [ebp + 8]
call fcn.00402f43
push ebx
push 1
lea ecx, [esp + 0x3c]
call fcn.00403082
mov eax, esi
jmp 0x402f2c
test dword [edi], 0x100
push 0xfffffffffffffffe
mov dword [esp + 0x14], ebx
pop esi
je 0x402e7d
push 4
call fcn.0040b095
pop ecx
cmp eax, ebx
je 0x402de3
lea ecx, [esp + 0x18]
mov dword [eax], ecx
jmp 0x402de5
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x94], 9
mov ecx, dword [edi + 4]
mov eax, dword [edi + 0x24]
lea edx, [esp + 0x18]
call fcn.004080e5
test al, al
je 0x402e4d
mov edi, dword [esp + 0x28]
sub edi, dword [esp + 0x24]
jne 0x402e1f
call fcn.0040af86
push ebx
lea eax, [esp + 0x14]
push eax
push edi
push dword [esp + 0x30]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402e4a
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x24]
cmp dword [esp + 0x10], eax
jne 0x402e4a
xor esi, esi
jmp 0x402e4d
or esi, 0xffffffff
mov byte [esp + 0x94], 5
cmp dword [esp + 0x24], ebx
je 0x402e65
push dword [esp + 0x24]
call fcn.0040afa1
pop ecx
push dword [esp + 0x18]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.0040afa1
pop ecx
jmp 0x402ea4
push ebx
lea ecx, [esp + 0x14]
push ecx
push dword [edi + 4]
push dword [edi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402ea1
mov eax, dword [esp + 0x10]
cmp eax, dword [edi + 4]
jne 0x402ea1
xor esi, esi
jmp 0x402ea4
or esi, 0xffffffff
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
je 0x402edc
cmp dword [esp + 0x4c], 0x10
mov eax, dword [esp + 0x38]
jae 0x402ec1
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402da1
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x34]
push eax
call fcn.00402f7a
lea ecx, [esp + 0x34]
jmp 0x402f21
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xf
call fcn.004031b2
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x98], ebx
call fcn.00402f7a
lea ecx, [esp + 0x18]
push ebx
push 1
call fcn.00403082
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8