Function at 0x41a780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d54a0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push edi
mov eax, dword [0x50f880]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [esi + 0x38], ebx
jne 0x41a832
lea edi, [esi + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x14], ebx
je 0x41a812
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 8]
mov ecx, eax
shr ecx, 2
mov ecx, dword [edx + ecx*4]
and eax, 3
lea eax, [ecx + eax*4]
mov eax, dword [eax]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41a7f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xc]
inc dword [esi + 0x10]
add ecx, ecx
add ecx, ecx
cmp ecx, dword [esi + 0x10]
ja 0x41a805
mov dword [esi + 0x10], ebx
dec dword [esi + 0x14]
jne 0x41a80d
mov dword [esi + 0x10], ebx
cmp dword [esi + 0x14], ebx
jne 0x41a7c1
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov edx, dword [0x50f008]
mov eax, dword [edx + 0xc]
mov ecx, 0x50f008
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], ebx
lea ebx, [esi + 0x1c]
push ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x1c], 1
mov byte [ebp - 4], 1
cmp dword [esi + 0x14], 0
je 0x41a9a5
lea eax, [ebp - 0x2c]
lea ecx, [esi + 4]
call fcn.0041a740
mov ecx, dword [eax]
test ecx, ecx
jne 0x41a87f
xor edx, edx
jmp 0x41a881
mov edx, dword [ecx]
mov ecx, dword [eax + 8]
mov eax, ecx
and ecx, 3
mov edi, ecx
mov ecx, dword [edx + 8]
shr eax, 2
cmp ecx, eax
ja 0x41a897
sub eax, ecx
mov ecx, dword [edx + 4]
mov edx, dword [ecx + eax*4]
mov ecx, dword [edx + edi*4]
lea eax, [edx + edi*4]
mov edi, dword [ebp - 0x10]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x41a8f4
cmp dword [edi + 0xc], 0
jl 0x41a8e8
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x41a8e8
call fcn.0041a6d0
mov dword [ebp - 0x14], eax
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x41a8dd
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov edi, dword [ebp - 0x14]
add edi, 0x10
mov dword [ebp - 0x10], edi
jmp 0x41a8f7
mov edi, dword [ecx - 0xc]
push ecx
lea eax, [ebp - 0x10]
call fcn.0041a620
mov edi, dword [ebp - 0x10]
cmp dword [esi + 0x14], 0
je 0x41a951
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 8]
mov ecx, eax
shr ecx, 2
mov ecx, dword [edx + ecx*4]
and eax, 3
lea eax, [ecx + eax*4]
mov eax, dword [eax]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41a92f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xc]
inc dword [esi + 0x10]
add ecx, ecx
add ecx, ecx
cmp ecx, dword [esi + 0x10]
ja 0x41a945
mov dword [esi + 0x10], 0
dec dword [esi + 0x14]
jne 0x41a951
mov dword [esi + 0x10], 0
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi - 0xc]
mov edx, dword [esi + 0x38]
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41a979
call fcn.0041a760
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a830
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41a830
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a9cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x41a9e2
call fcn.0041a760
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret