Function at 0x418500
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d5520
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push esi
push edi
mov eax, dword [0x50f880]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
lea eax, [ebx + 0x48]
mov dword [esp + 0x18], eax
xor esi, esi
mov dword [esp + 0x50], esi
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebx + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x44]
push 0xffffffffffffffff
push esi
lea edx, [esp + 0x30]
push edx
push 2
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x418825
cmp dword [ebx + 0x38], esi
jne 0x4185fe
lea edi, [ebx + 0x1c]
push edi
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x34], 1
mov byte [esp + 0x50], 1
cmp dword [ebx + 0x14], esi
je 0x4185e8
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 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 0x4185c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebx + 0xc]
inc dword [ebx + 0x10]
add ecx, ecx
add ecx, ecx
cmp ecx, dword [ebx + 0x10]
ja 0x4185db
mov dword [ebx + 0x10], esi
dec dword [ebx + 0x14]
jne 0x4185e3
mov dword [ebx + 0x10], esi
cmp dword [ebx + 0x14], esi
jne 0x418597
push edi
mov byte [esp + 0x54], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [esp + 0x34], 0
jmp 0x41880d
mov edx, dword [0x50f008]
mov eax, dword [edx + 0xc]
mov ecx, 0x50f008
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0xc], edi
lea esi, [ebx + 0x1c]
push esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x24], 1
mov byte [esp + 0x50], 3
cmp dword [ebx + 0x14], 0
je 0x4187cb
lea ecx, [ebx + 4]
lea eax, [esp + 0x38]
call fcn.0041a740
mov ecx, dword [eax]
test ecx, ecx
jne 0x41864d
xor edx, edx
jmp 0x41864f
mov edx, dword [ecx]
mov ecx, dword [eax + 8]
mov esi, dword [edx + 8]
mov eax, ecx
shr eax, 2
and ecx, 3
cmp esi, eax
ja 0x418663
sub eax, esi
mov edx, dword [edx + 4]
mov eax, dword [edx + eax*4]
mov edx, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
lea eax, [edi - 0x10]
lea esi, [edx - 0x10]
mov dword [esp + 0x14], eax
cmp esi, eax
je 0x418725
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
mov dword [esp + 0x10], ecx
jl 0x418714
mov ecx, dword [esi]
cmp ecx, dword [eax]
jne 0x418714
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x4186b9
cmp eax, dword [esi]
jne 0x4186b9
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4186ed
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x418846
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00453d28
add esp, 0x10
mov edx, dword [esp + 0x10]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x41870b
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0x10
mov dword [esp + 0xc], edi
jmp 0x418725
mov edi, dword [edx - 0xc]
push edx
lea eax, [esp + 0x10]
call fcn.0041a620
mov edi, dword [esp + 0xc]
xor esi, esi
cmp dword [ebx + 0x14], esi
je 0x418778
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 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 0x41875e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebx + 0xc]
inc dword [ebx + 0x10]
add ecx, ecx
add ecx, ecx
cmp ecx, dword [ebx + 0x10]
ja 0x418770
mov dword [ebx + 0x10], esi
dec dword [ebx + 0x14]
jne 0x418778
mov dword [ebx + 0x10], esi
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi - 0xc]
mov edx, dword [ebx + 0x38]
push esi
lea ecx, [esp + 0x20]
push ecx
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, esi
jne 0x4187a1
call fcn.0041a760
add edi, 0xfffffff0
mov byte [esp + 0x50], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4185fe
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
jmp 0x4185fe
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add edi, 0xfffffff0
mov byte [esp + 0x24], 0
mov byte [esp + 0x50], 0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4187f8
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [ebx + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x41880b
call fcn.0041a760
xor esi, esi
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x30]
push ecx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x418571
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.0041a6c0
int3