Function at 0x413d50
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43064d
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x43f440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
xor esi, esi
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x18], 0
nop
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
jne 0x413ddc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x413e06
push 0xfa
call edi
inc esi
cmp esi, 0x10
jl 0x413da0
mov eax, dword [ebp - 0x34]
push 0
lea ecx, [ebp - 0x18]
mov word [ebp - 0x14], 0xfeff
push ecx
push 2
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.00401e80
mov ecx, eax
test ecx, ecx
je 0x414584
jmp 0x413e0d
xor al, al
jmp 0x414566
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp - 0x3c]
xor edx, edx
or edi, 0xffffffff
mov dword [ebp - 4], 0
mov dword [ebp - 0x38], edx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x41452a
nop dword [eax]
mov eax, dword [ecx + edx*4]
lea edi, [edx*4]
sub eax, 0x10
push eax
call fcn.00402560
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
mov eax, dword [ebp - 0x40]
mov byte [ebp - 4], 1
mov eax, dword [eax]
mov eax, dword [eax + edi]
sub eax, 0x10
push eax
call fcn.00402560
add eax, 0x10
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 2
mov eax, dword [eax]
mov eax, dword [eax + edi]
sub eax, 0x10
push eax
call fcn.00402560
add esp, 0xc
lea edi, [eax + 0x10]
mov dword [ebp - 0x24], edi
movzx eax, word [esi]
xor ebx, ebx
mov byte [ebp - 4], 3
mov ecx, eax
test ax, ax
je 0x413f0c
mov edi, esi
push ecx
call fcn.004227b7
add esp, 4
test eax, eax
je 0x413ebc
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x413ebe
xor ebx, ebx
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x413ea4
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x413f0c
sub ebx, esi
sar ebx, 1
js 0x41458e
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x413efa
push ebx
lea ecx, [ebp - 0x30]
call fcn.00401bb0
mov esi, dword [ebp - 0x30]
cmp ebx, dword [esi - 8]
jg 0x41458e
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
movzx eax, word [esi]
mov ebx, esi
push eax
call fcn.004227b7
add esp, 4
test eax, eax
je 0x413ff3
movzx eax, word [ebx + 2]
add ebx, 2
push eax
call fcn.004227b7
add esp, 4
test eax, eax
jne 0x413f22
cmp ebx, esi
je 0x413ff3
mov edx, dword [esi - 0xc]
sub ebx, esi
sar ebx, 1
test edx, edx
js 0x41458e
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x413f6a
push edx
lea ecx, [ebp - 0x30]
call fcn.00401bb0
mov esi, dword [ebp - 0x30]
mov eax, dword [esi - 0xc]
lea edx, [esi + ebx*2]
sub eax, ebx
mov dword [ebp - 0x1c], eax
lea ecx, [eax*2 + 2]
test ecx, ecx
je 0x413fcb
test edx, edx
jne 0x413f9b
call fcn.0041f9f6
mov dword [eax], 0x16
call fcn.0041ff14
mov eax, 0x16
jmp 0x413fcd
mov eax, dword [esi - 0xc]
lea eax, [eax*2 + 2]
cmp eax, ecx
jae 0x413fc0
call fcn.0041f9f6
mov dword [eax], 0x22
call fcn.0041ff14
mov eax, 0x22
jmp 0x413fcd
push ecx
push edx
push esi
call fcn.0041dbc0
add esp, 0xc
xor eax, eax
push eax
call fcn.00401a10
mov eax, dword [ebp - 0x1c]
add esp, 4
test eax, eax
js 0x41458e
cmp eax, dword [esi - 8]
jg 0x41458e
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov eax, dword [ebp - 0x20]
xor ebx, ebx
movzx ecx, word [eax]
test cx, cx
je 0x41406d
mov edi, eax
push ecx
call fcn.004227b7
add esp, 4
test eax, eax
je 0x41401a
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x41401c
xor ebx, ebx
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x414002
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
test ebx, ebx
je 0x41406d
sub ebx, eax
sar ebx, 1
js 0x41458e
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, ebx
or ecx, edx
jge 0x41405b
push ebx
lea ecx, [ebp - 0x20]
call fcn.00401bb0
mov eax, dword [ebp - 0x20]
cmp ebx, dword [eax - 8]
jg 0x41458e
xor ecx, ecx
mov dword [eax - 0xc], ebx
mov word [eax + ebx*2], cx
mov ebx, eax
movzx eax, word [eax]
push eax
call fcn.004227b7
add esp, 4
test eax, eax
je 0x414164
movzx eax, word [ebx + 2]
add ebx, 2
push eax
call fcn.004227b7
add esp, 4
test eax, eax
jne 0x414083
mov eax, dword [ebp - 0x20]
cmp ebx, eax
je 0x414164
mov ecx, dword [eax - 0xc]
sub ebx, eax
sar ebx, 1
mov dword [ebp - 0x1c], ecx
test ecx, ecx
js 0x41458e
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, dword [eax - 0xc]
or ecx, edx
jge 0x4140d4
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
call fcn.00401bb0
mov eax, dword [ebp - 0x20]
lea ecx, [eax + ebx*2]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [eax - 0xc]
sub ecx, ebx
mov dword [ebp - 0x28], ecx
lea edx, [ecx*2 + 2]
test edx, edx
je 0x414139
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
jne 0x414109
call fcn.0041f9f6
mov dword [eax], 0x16
call fcn.0041ff14
lea eax, [ebx + 0x16]
jmp 0x41413b
mov ecx, dword [eax - 0xc]
lea ecx, [ecx*2 + 2]
cmp ecx, edx
jae 0x41412e
call fcn.0041f9f6
mov dword [eax], 0x22
call fcn.0041ff14
mov eax, 0x22
jmp 0x41413b
push edx
push ebx
push eax
call fcn.0041dbc0
add esp, 0xc
xor eax, eax
push eax
call fcn.00401a10
mov ecx, dword [ebp - 0x28]
add esp, 4
test ecx, ecx
js 0x41458e
mov eax, dword [ebp - 0x20]
cmp ecx, dword [eax - 8]
jg 0x41458e
xor edx, edx
mov dword [eax - 0xc], ecx
mov word [eax + ecx*2], dx
movzx eax, word [edi]
xor ebx, ebx
mov dword [ebp - 0x28], edi
test ax, ax
je 0x4141db
mov ecx, eax
push ecx
call fcn.004227b7
add esp, 4
test eax, eax
je 0x41418b
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x41418d
xor ebx, ebx
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x414173
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x4141db
sub ebx, edi
sar ebx, 1
js 0x41458e
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x4141c9
push ebx
lea ecx, [ebp - 0x24]
call fcn.00401bb0
mov edi, dword [ebp - 0x24]
cmp ebx, dword [edi - 8]
jg 0x41458e
xor eax, eax
mov dword [edi - 0xc], ebx
mov word [edi + ebx*2], ax
movzx eax, word [edi]
mov ebx, edi
push eax
call fcn.004227b7
add esp, 4
test eax, eax
je 0x4142c2
movzx eax, word [ebx + 2]
add ebx, 2
push eax
call fcn.004227b7
add esp, 4
test eax, eax
jne 0x4141f1
cmp ebx, edi
je 0x4142c2
mov edx, dword [edi - 0xc]
sub ebx, edi
sar ebx, 1
test edx, edx
js 0x41458e
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, edx
or eax, ecx
jge 0x414239
push edx
lea ecx, [ebp - 0x24]
call fcn.00401bb0
mov edi, dword [ebp - 0x24]
mov eax, dword [edi - 0xc]
lea edx, [edi + ebx*2]
sub eax, ebx
mov dword [ebp - 0x28], eax
lea ecx, [eax*2 + 2]
test ecx, ecx
je 0x41429a
test edx, edx
jne 0x41426a
call fcn.0041f9f6
mov dword [eax], 0x16
call fcn.0041ff14
mov eax, 0x16
jmp 0x41429c
mov eax, dword [edi - 0xc]
lea eax, [eax*2 + 2]
cmp eax, ecx
jae 0x41428f
call fcn.0041f9f6
mov dword [eax], 0x22
call fcn.0041ff14
mov eax, 0x22
jmp 0x41429c
push ecx
push edx
push edi
call fcn.0041dbc0
add esp, 0xc
xor eax, eax
push eax
call fcn.00401a10
mov eax, dword [ebp - 0x28]
add esp, 4
test eax, eax
js 0x41458e
cmp eax, dword [edi - 8]
jg 0x41458e
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
call fcn.00401e80
mov ecx, eax
test ecx, ecx
je 0x414584
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 4
test eax, eax
je 0x414584
mov edx, eax
mov ecx, esi
nop
mov bx, word [ecx]
cmp bx, word [edx]
jne 0x414316
test bx, bx
je 0x414312
mov bx, word [ecx + 2]
cmp bx, word [edx + 2]
jne 0x414316
add ecx, 4
add edx, 4
test bx, bx
jne 0x4142f0
xor ecx, ecx
jmp 0x41431b
sbb ecx, ecx
or ecx, 1
test ecx, ecx
je 0x4143be
lea ecx, [esi - 0x10]
lea edi, [eax - 0x10]
cmp ecx, edi
je 0x414373
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x414367
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x414367
push ecx
call fcn.00402560
add esp, 4
mov dword [ebp - 0x28], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x41435f
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x28]
add eax, 0x10
mov dword [ebp - 0x2c], eax
jmp 0x414373
push dword [esi - 0xc]
lea ecx, [ebp - 0x2c]
push esi
call fcn.00401840
push esi
lea eax, [ebp - 0x1c]
push str.__s__r_n
push eax
call fcn.00402f40
mov edi, dword [ebp - 0x1c]
add esp, 0xc
cmp dword [edi - 4], 1
jle 0x41439c
push dword [edi - 0xc]
lea ecx, [ebp - 0x1c]
call fcn.00401ab0
mov edi, dword [ebp - 0x1c]
mov eax, dword [edi - 0xc]
lea ecx, [ebp - 0x18]
mov ebx, dword [ebp - 0x34]
add eax, eax
push 0
push ecx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4144a2
mov edi, dword [ebp - 0x24]
push edi
push dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
push str._s_s_r_n
push eax
call fcn.00402f40
mov edi, dword [ebp - 0x1c]
add esp, 0x10
cmp dword [edi - 4], 1
mov ebx, dword [edi - 0xc]
jle 0x4143eb
push ebx
lea ecx, [ebp - 0x1c]
call fcn.00401ab0
mov edi, dword [ebp - 0x1c]
push 0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebx + ebx]
mov ebx, dword [ebp - 0x34]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4144a2
mov byte [ebp - 4], 3
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x414424
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x24]
or edi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x414445
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x20]
mov eax, edi
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x414463
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41447e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
inc edx
mov dword [ebp - 0x38], edx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
cmp edx, eax
jb 0x413e40
mov esi, dword [ebp - 0x2c]
jmp 0x41452d
push 0
push ebx
call fcn.00412390
add esp, 8
mov byte [ebp - 4], 3
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4144c9
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x24]
or edi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4144ea
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x20]
mov eax, edi
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x414508
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x414523
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x2c]
xor bl, bl
jmp 0x414548
mov ebx, dword [ebp - 0x34]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push ebx
call fcn.00412390
add esp, 8
mov bl, 1
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x414564
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041c66f
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00401f80
push 0x80070057
call fcn.00401f80
int3