Function at 0x40c2d0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x44fe68
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x469b70]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00417336
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c313
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
push 0
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
mov dword [esp + 0x5c], 0
call fcn.0040be30
mov edi, dword [esp + 0x20]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x40c3a2
push 0xa
mov ecx, esi
call fcn.0040b160
lea eax, [edi - 0x10]
mov dword [esp + 0x54], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c38c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov dword [esp + 0x18], 0x1388
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0x350]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor ebx, ebx
lea ecx, [esi + 0x358]
mov dword [esp + 0x30], ebx
mov edi, ebx
mov ebp, ebx
call fcn.00405d70
cmp dword [esi + 0x384], ebx
je 0x40c402
lea eax, [esp + 0x3c]
push eax
lea ecx, [esi + 0x378]
call fcn.0040b430
mov ecx, dword [eax + 4]
mov ebx, dword [eax]
mov edi, dword [eax + 8]
mov ebp, dword [eax + 0xc]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x18], 1
jmp 0x40c40a
mov dword [esp + 0x18], 0x1388
mov edx, dword [esi + 0x358]
mov eax, dword [edx + 0x14]
lea ecx, [esi + 0x358]
call eax
test ebp, ebp
ja 0x40c42d
cmp byte [esi + 0x260], 0
je 0x40c3aa
jmp 0x40c4e6
mov eax, dword [esp + 0x1c]
push 0
movzx ebx, bl
push 0
lea ecx, [ebx + ebx*2]
push edi
lea edx, [esi + ecx*4 + 0x290]
push eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, edi
je 0x40c464
mov dword [esp + 0x14], str.ERR:_d_
jmp 0x40c49d
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x2c]
push ecx
push ebp
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40c48a
mov dword [esp + 0x14], str.ERR:_d__
jmp 0x40c49d
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x40c49d
mov dword [esp + 0x14], 0x455cf8
mov eax, dword [esp + 0x30]
push eax
call fcn.00416ad3
add esp, 4
cmp dword [esp + 0x14], 0
jne 0x40c4dd
mov eax, dword [esp + 0x24]
add dword [eax + 4], ebp
mov ecx, dword [eax + 4]
cmp ecx, dword [eax + 8]
jl 0x40c3aa
push ebx
mov ecx, esi
call fcn.0040b3b0
mov ecx, esi
call fcn.0040b220
test eax, eax
je 0x40c3aa
jmp 0x40c4e6
push 0xa
mov ecx, esi
call fcn.0040b160
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40c4f5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x54], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c51d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret