Function at 0x41ca30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49de50
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4c7008]
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 0x41ca84
mov eax, dword [eax]
test eax, eax
je 0x41ca84
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [esi + 0x18], 0
jne 0x41cd9e
lea eax, [ebp - 0x48]
mov ecx, esi
push eax
call fcn.0041d8e0
mov byte [ebp - 4], 1
cmp dword [ebp - 0x38], 0
je 0x41cd4a
xorps xmm0, xmm0
push 0
movlpd qword [ebp - 0x1c], xmm0
push 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
call fcn.0041dea0
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 0x41caf5
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 0x41caf8
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x58], ecx
test ecx, ecx
je 0x41cd0a
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 0x41cb86
cmp esi, 0xffffffff
jne 0x41cb8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x41ccee
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 0x41cb30
cmp esi, 0xffffffff
je 0x41ccee
test esi, esi
je 0x41ccee
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41cbb2
mov eax, dword [eax]
test eax, eax
je 0x41cbab
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.00422b10
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 0x41cc40
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 0x41cc96
push 4
lea ecx, [ebp - 0x14]
call fcn.00408cd0
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41cc61
mov eax, dword [eax]
test eax, eax
je 0x41cc61
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.0041df50
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x41cc96
mov eax, dword [eax]
test eax, eax
je 0x41cc8f
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 0x41cd0a
mov edx, dword [ebp - 0x24]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x41cccd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41cccd
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004991e4
add esp, 8
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
jmp 0x41cd0a
lea eax, [ebp - 0x1c]
cmp edi, eax
je 0x41cd0a
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 0x41cd3b
mov esi, dword [edi]
lea ecx, [edi + 8]
call fcn.0041c700
push 0x54
push edi
call fcn.004991e4
add esp, 8
mov edi, esi
cmp esi, ebx
jne 0x41cd20
mov byte [ebp - 4], 1
push 0x54
push ebx
call fcn.004991e4
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x41cd8a
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41cd80
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41cd80
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004991e4
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 0x41cdc0
mov eax, dword [eax]
test eax, eax
je 0x41cdb9
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.004991a3
mov esp, ebp
pop ebp
ret