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

Disassembly:
push 0xffffffffffffffff
push 0x4be8e0
mov eax, dword fs:[0]
push eax
sub esp, 0x134
mov eax, dword [0x4e7d04]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e7d04]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x15c]
lea eax, [esp + 0x20]
xor ebx, ebx
push eax
mov dword [esp + 0x154], ebx
call fcn.00402f80
mov byte [esp + 0x150], 1
mov eax, dword [esp + 0x158]
push ebp
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push eax
call fcn.00404130
add esp, 4
lea ecx, [esp + 0x28]
add eax, 0x10
push ecx
mov dword [esi], eax
call fcn.00408790
cmp eax, ebx
jne 0x40841a
lea edx, [esp + 0x20]
push edx
call fcn.004086c0
mov dword [esp + 0x150], 0xffffffff
mov eax, dword [esp + 0x158]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408413
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x408571
push 0x100
lea edx, [esp + 0x42]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x48], cx
call fcn.00482260
add esp, 0xc
lea eax, [esp + 0x3c]
push 0x80
push eax
call fcn.00407ef0
mov edx, dword [0x4eab28]
mov eax, dword [edx + 0xc]
add esp, 8
mov ecx, 0x4eab28
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x3c]
push ecx
mov byte [esp + 0x154], 2
mov edx, dword [esp + 0x15c]
push edx
lea eax, [esp + 0x20]
push str._s_s.tf
push eax
call fcn.00409b50
mov ecx, dword [esp + 0x28]
add esp, 0x10
push ebx
push 0x80
push 2
push ebx
push 2
push 0x120116
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x408506
lea eax, [esp + 0x3c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4084b0
sub eax, edx
push ebx
sar eax, 1
lea edx, [esp + 0x20]
push edx
mov edi, eax
push edi
lea eax, [esp + 0x48]
push eax
push esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4084e9
cmp edi, dword [esp + 0x1c]
jne 0x4084f2
mov ebx, 1
jmp 0x4084f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40850f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp], eax
mov byte [esp + 0x150], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x20]
push ecx
call fcn.004086c0
mov dword [esp + 0x150], 0xffffffff
mov eax, dword [esp + 0x158]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40856f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.004820d9
add esp, 0x140
ret