Function at 0x42cd70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ea9a8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push edi
mov eax, dword [0x53f1e4]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
jmp 0x42cda0
cmp byte [esi + 0xa0], 0
je 0x42cdb2
cmp byte [esi], 0
je 0x42cf98
mov eax, dword [esi + 0xb4]
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42cda0
cmp byte [esi + 0xa0], al
jne 0x42cf98
cmp byte [esi + 0x6c], al
jne 0x42cdf3
mov ecx, esi
call fcn.0042c6f0
mov ecx, esi
call fcn.0042b960
test al, al
je 0x42ce7c
mov byte [esi + 0x6c], 1
mov edx, dword [0x53ef48]
mov eax, dword [edx + 0xc]
mov ecx, 0x53ef48
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x10], ebx
lea edi, [esi + 0x84]
push edi
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0xac], 0
je 0x42cf82
mov eax, dword [esi + 0xa8]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
lea eax, [ecx - 0x10]
lea edi, [ebx - 0x10]
cmp eax, edi
je 0x42ce9b
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x42ce89
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x42ce89
call fcn.00406c60
mov dword [esp + 0x14], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x42ce6f
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ebx, dword [esp + 0x14]
add ebx, 0x10
mov dword [esp + 0x10], ebx
jmp 0x42ce9b
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42cda0
mov ebx, dword [ecx - 0xc]
push ecx
lea ecx, [esp + 0x14]
push ecx
call fcn.00408480
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0xa8]
mov edi, dword [eax]
cmp edi, eax
je 0x42cee4
mov eax, dword [edi + 4]
mov edx, dword [edi]
mov dword [eax], edx
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [eax + 4], ecx
mov eax, dword [edi + 8]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42ced5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call fcn.004b1c22
add esp, 4
dec dword [esi + 0xac]
lea eax, [esi + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx - 0xc]
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [eax + eax]
mov eax, dword [esi + 0x80]
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [esi + 0x9c]
mov eax, dword [esi + 0x9c]
cdq
mov ecx, 0x64
idiv ecx
test edx, edx
jne 0x42cf32
mov edx, dword [esi + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [esi + 0x9c]
cdq
mov ecx, 0x3e8
idiv ecx
test edx, edx
jne 0x42cf55
mov ecx, esi
call fcn.0042c1f0
mov dword [esi + 0x9c], 0
add ebx, 0xfffffff0
mov dword [esp + 0x28], 0xffffffff
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x42cda0
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
jmp 0x42cda0
mov ecx, dword [esi + 0xb4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x42cf55
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret