Function at 0x41c780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49c010
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4c5008]
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 - 0x30], esi
push 4
lea ecx, [ebp - 0x20]
call fcn.00408cd0
lea eax, [esi + 4]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x20], eax
test eax, eax
je 0x41c7d4
mov eax, dword [eax]
test eax, eax
je 0x41c7d4
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [esi + 0x18], 0
jne 0x41caee
lea eax, [ebp - 0x48]
mov ecx, esi
push eax
call fcn.0041d630
mov byte [ebp - 4], 1
cmp dword [ebp - 0x38], 0
je 0x41ca9a
xorps xmm0, xmm0
push 0
movlpd qword [ebp - 0x1c], xmm0
push 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
call fcn.0041dbf0
mov ebx, eax
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 4
lea edi, [esi + 8]
lea ecx, [ebp - 0x1c]
cmp ecx, edi
je 0x41c845
mov ebx, dword [edi]
mov dword [ebp - 0x1c], ebx
mov dword [edi], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x18], ecx
mov dword [edi + 4], eax
jmp 0x41c848
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x58], ecx
test ecx, ecx
je 0x41ca5a
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0x48]
push 0
cmovae eax, dword [ebp - 0x48]
push 0x80
push 4
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x30]
cmp byte [eax], 0
jne 0x41c8d6
cmp esi, 0xffffffff
jne 0x41c8df
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x41ca3e
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0x48]
push 0
cmovae eax, dword [ebp - 0x48]
push 0x80
push 4
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x14]
mov esi, eax
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, 0xa
jb 0x41c880
cmp esi, 0xffffffff
je 0x41ca3e
test esi, esi
je 0x41ca3e
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41c902
mov eax, dword [eax]
test eax, eax
je 0x41c8fb
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], 0
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
movq qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 9
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
call fcn.00422860
xorps xmm0, xmm0
mov dword [ebp - 0x4c], 0
movq qword [ebp - 0x54], xmm0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov byte [ebp - 4], 0xa
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
cmp ecx, eax
je 0x41c990
push 0
lea edx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push edx
sub eax, ecx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41c9e6
push 4
lea ecx, [ebp - 0x14]
call fcn.00408cd0
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41c9b1
mov eax, dword [eax]
test eax, eax
je 0x41c9b1
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 0xb
mov ecx, edi
mov eax, dword [edi]
push ebx
push dword [ebx]
push dword [eax]
lea eax, [ebp - 0x5c]
push eax
call fcn.0041dca0
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x41c9e6
mov eax, dword [eax]
test eax, eax
je 0x41c9df
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x14], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x41ca5a
mov edx, dword [ebp - 0x24]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x41ca1d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41ca1d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00497404
add esp, 8
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
jmp 0x41ca5a
lea eax, [ebp - 0x1c]
cmp edi, eax
je 0x41ca5a
mov eax, dword [edi]
mov dword [edi], ebx
mov ebx, eax
mov dword [ebp - 0x1c], ebx
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x58]
mov dword [edi + 4], ecx
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xc
mov edi, dword [ebx]
mov dword [ebx], ebx
mov dword [ebx + 4], ebx
mov dword [ebp - 0x18], 0
cmp edi, ebx
je 0x41ca8b
mov esi, dword [edi]
lea ecx, [edi + 8]
call fcn.0041c450
push 0x54
push edi
call fcn.00497404
add esp, 8
mov edi, esi
cmp esi, ebx
jne 0x41ca70
mov byte [ebp - 4], 1
push 0x54
push ebx
call fcn.00497404
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x41cada
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41cad0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41cad0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00497404
add esp, 8
xor eax, eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41cb10
mov eax, dword [eax]
test eax, eax
je 0x41cb09
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], 0
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.004973c3
mov esp, ebp
pop ebp
ret