Function at 0x42d510
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4f3a98
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push edi
mov eax, dword [0x54b1b4]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
jmp 0x42d540
cmp byte [esi + 0xa0], 0
je 0x42d552
cmp byte [esi], 0
je 0x42d738
mov eax, dword [esi + 0xb4]
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42d540
cmp byte [esi + 0xa0], al
jne 0x42d738
cmp byte [esi + 0x6c], al
jne 0x42d593
mov ecx, esi
call fcn.0042ce90
mov ecx, esi
call fcn.0042c100
test al, al
je 0x42d61c
mov byte [esi + 0x6c], 1
mov edx, dword [0x54af28]
mov eax, dword [edx + 0xc]
mov ecx, 0x54af28
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 0x42d722
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 0x42d63b
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x42d629
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x42d629
call fcn.0042e350
mov dword [esp + 0x14], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x42d60f
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 0x42d63b
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42d540
mov ebx, dword [ecx - 0xc]
push ecx
lea ecx, [esp + 0x14]
push ecx
call fcn.0042edc0
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0xa8]
mov edi, dword [eax]
cmp edi, eax
je 0x42d684
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 0x42d675
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call fcn.004ba3a4
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 0x42d6d2
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 0x42d6f5
mov ecx, esi
call fcn.0042c990
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 0x42d540
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
jmp 0x42d540
mov ecx, dword [esi + 0xb4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x42d6f5
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret