Function at 0x413b80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4379bf
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push esi
push edi
mov eax, dword [0x44c040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
cmp dword [edi + 8], 0
jne 0x413fde
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 4], eax
test eax, eax
jne 0x413bde
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x50], eax
mov ecx, edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0xffffffff
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00413720
cmp dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x20], eax
je 0x413bcb
cmp byte [edi + 0x50], 0
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x44], eax
je 0x413c11
mov eax, dword [edi + 0x4c]
jmp 0x413c13
xor eax, eax
push 1
xor ecx, ecx
mov dword [ebp - 0x40], eax
test eax, eax
lea eax, [ebp - 0x44]
push 0xffffffffffffffff
push 0
setne cl
inc ecx
push eax
push ecx
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
push 1
mov esi, eax
lea eax, [edi + 0x18]
push 1
push eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, 1
je 0x413fde
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
sub esi, 0
je 0x413ece
sub esi, 1
je 0x413c73
sub esi, 0xbf
jne 0x413bcb
jmp 0x413fb3
mov esi, dword [ebp - 0x10]
lea eax, [esi + 0x34]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 0x14]
mov esi, dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x413fb3
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov esi, dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x413fb3
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov esi, dword [eax + 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x413dcc
nop
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x10]
cmp byte [esi + 0x50], 0
je 0x413da4
cmp dword [esi + 0x58], 0
je 0x413d91
mov eax, dword [esi + 0x4c]
push 4
push 0x4ff
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push 0
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
test eax, eax
je 0x413da4
cmp eax, 1
jne 0x413d9c
push eax
push 0
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x64], 0
push 0
lea eax, [ebp - 0x7c]
movq qword [ebp - 0x6c], xmm0
push eax
movups xmmword [ebp - 0x7c], xmm0
call edi
test eax, eax
je 0x413d76
nop dword [eax]
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x7c]
push eax
call edi
test eax, eax
jne 0x413d50
push 4
push 0x4ff
push 0
lea eax, [ebp - 0x1c]
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
test eax, eax
jne 0x413d23
jmp 0x413da4
push 0
push dword [esi + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x413ea7
lea eax, [esi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 0x14]
mov esi, dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x413ce0
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + 0x20]
mov edi, dword [esi + 0x2c]
test eax, eax
jne 0x413ddd
xor edx, edx
jmp 0x413ddf
mov edx, dword [eax]
mov ecx, dword [edx + 8]
mov eax, edi
shr eax, 2
dec ecx
and ecx, eax
and edi, 3
mov eax, dword [edx + 4]
mov eax, dword [eax + ecx*4]
mov edi, dword [eax + edi*4]
add dword [esi + 0x30], 0xffffffff
jne 0x413e05
mov dword [esi + 0x2c], 0
jmp 0x413e08
inc dword [esi + 0x2c]
lea eax, [esi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, edi
call fcn.0040d5b0
mov dword [ebp - 0x24], eax
mov ecx, edi
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
push eax
mov dword [ebp - 0x38], 1
call fcn.0040d5b0
push eax
lea ecx, [esi + 0x10]
call fcn.004145d0
test al, al
je 0x413e91
cmp dword [ebp - 0x38], 0
je 0x413e91
mov esi, dword [ebp - 0x3c]
mov ecx, edi
push 0x4136a0
call fcn.0040d520
push eax
mov ecx, edi
call fcn.0040d4f0
push eax
mov ecx, edi
call fcn.0040d4e0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFileEx]
mov esi, dword [ebp - 0x10]
test eax, eax
je 0x413e79
inc dword [esi + 0x1c]
neg eax
sbb eax, eax
neg eax
dec eax
cmp eax, 0xffffffff
jne 0x413ea7
push dword [ebp - 0x24]
mov ecx, esi
call fcn.004134a0
jmp 0x413ea7
test edi, edi
je 0x413ea7
mov ecx, edi
call fcn.0040d5c0
push 0x20
push edi
call fcn.004218b1
add esp, 8
lea edi, [esi + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [esi + 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
test esi, esi
jne 0x413c97
jmp 0x413fb3
cmp dword [ebp - 0x20], 0
je 0x413eef
push 0
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x413bcb
mov ecx, dword [ebp - 0x10]
mov esi, dword [ecx + 0xc]
mov dword [ebp - 0x24], esi
lea eax, [esi + 1]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x413bcb
mov dword [ebp - 0x4c], eax
add ecx, 0x10
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x48], 1
push eax
push esi
call fcn.00414420
test al, al
je 0x413bcb
push 0x2c
call fcn.0042187c
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x413f4d
push esi
mov ecx, eax
call fcn.0040d460
mov esi, eax
jmp 0x413f4f
xor esi, esi
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call fcn.0040d530
test al, al
je 0x413f6e
mov ecx, dword [ebp - 0x10]
push esi
call fcn.00414000
test eax, eax
jns 0x413f8f
test esi, esi
je 0x413f84
mov ecx, esi
call fcn.0040d4b0
push 0x2c
push esi
call fcn.004218b1
add esp, 8
push dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
call fcn.004134a0
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x18], 0xffffffff
push eax
call fcn.00413720
cmp dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x20], eax
je 0x413bcb
push 1
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
push 1
push 1
push dword [ebp - 0x2c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, 1
jne 0x413c54
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret