Function at 0x40bfa0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x463a0d
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4b5898]
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 esi, ecx
mov dword [ebp - 0x50], esi
mov eax, dword [esi + 0x1fe8]
mov dword [ebp - 0x60], eax
mov eax, dword [esi + 0x1fec]
push 0xffffffffffffffff
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x60]
push 0
push eax
push 2
mov dword [ebp - 0x44], 0
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x40c29a
lea ecx, [esi + 0x1fb8]
add esi, 0x1fd0
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x58], esi
xor eax, eax
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x34], eax
push ecx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
cmp eax, esi
je 0x40c062
mov ebx, dword [esi]
mov eax, dword [esi + 8]
mov dword [esi], edi
mov edi, dword [esi + 4]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], edi
mov dword [esi + 4], 0
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x34], eax
mov dword [esi + 8], 0
mov dword [ebp - 0x2c], edi
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, ebx
cmp esi, edi
je 0x40c20d
mov ecx, dword [esi + 0x10]
mov eax, SysReAllocString
sub eax, ecx
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x40], ecx
cmp eax, 1
jb 0x40c2bd
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x2c], esi
jb 0x40c0a0
mov eax, dword [esi]
mov dword [ebp - 0x2c], eax
lea edx, [ecx + 1]
mov dword [ebp - 0x28], 0
mov edi, 7
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x30], edx
cmp edx, edi
jbe 0x40c14f
mov edi, edx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x40c0e4
mov edi, SysReAllocString
mov eax, 0xfffffffe
jmp 0x40c106
cmp edi, 0xa
mov eax, 0xa
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x7fffffff
ja 0x40c2b8
add eax, eax
cmp eax, 0x1000
jb 0x40c133
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x40c2b8
push ecx
call fcn.00461e10
add esp, 4
test eax, eax
je 0x40c294
mov ecx, dword [ebp - 0x40]
lea ebx, [eax + 0x23]
mov edx, dword [ebp - 0x30]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x40c14c
test eax, eax
je 0x40c14a
push eax
call fcn.00461e10
mov ecx, dword [ebp - 0x40]
add esp, 4
mov edx, dword [ebp - 0x30]
mov ebx, eax
jmp 0x40c14c
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], edi
lea edi, [ecx + ecx]
push edi
push dword [ebp - 0x2c]
mov dword [ebp - 0x18], edx
push ebx
call sub.VCRUNTIME140.dll_memcpy
or dword [ebp - 0x44], 1
add esp, 0xc
mov eax, 0xa
xor ecx, ecx
mov word [edi + ebx], ax
mov eax, dword [ebp - 0x30]
push 2
push ecx
push ecx
mov word [ebx + eax*2], cx
mov ebx, dword [ebp - 0x50]
push dword [ebx + 0x1ff4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x54]
push 0
push eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
add eax, eax
push eax
push ecx
push dword [ebx + 0x1ff4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebx + 0x1ff4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40c1f8
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c1ee
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c294
push edx
push ecx
call fcn.00461bf2
add esp, 8
mov edi, dword [ebp - 0x38]
add esi, 0x18
cmp esi, edi
jne 0x40c075
mov ebx, dword [ebp - 0x3c]
mov eax, edi
jmp 0x40c210
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x40c275
push ecx
mov edx, eax
mov ecx, ebx
call fcn.0040de70
mov eax, dword [ebp - 0x48]
add esp, 4
sub eax, ebx
sar eax, 3
imul eax, eax, 0xaaaaaaab
lea ecx, [eax + eax*2]
mov eax, ebx
shl ecx, 3
cmp ecx, 0x1000
jb 0x40c256
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c294
push ecx
push ebx
call fcn.00461bf2
add esp, 8
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x60]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x40c29a
mov esi, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x4c]
jmp 0x40c013
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
xor eax, eax
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.004619c0
mov esp, ebp
pop ebp
ret
call fcn.00402690
call fcn.00402530
int3