Function at 0x10039770
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100841d6
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 4], 1
pushal
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x24]
push dword [ebp + 8]
mov dword [ebp - 0x2c], 0
push str._s:__s
push eax
call fcn.1003a800
add esp, 0x10
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x24]
call fcn.100394f0
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x24]
mov eax, ebx
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x100397fd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x100398cf
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push 0x1008fa70
call fcn.10022bb0
push ecx
mov byte [ebp - 4], 3
mov ecx, esp
mov dword [ebp - 0x28], esp
push str.Cameyo.log
call fcn.10022bb0
push ecx
mov ecx, esp
mov byte [ebp - 4], 4
call fcn.1003da80
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.1003a550
add esp, 0xc
push edi
push edi
push 4
push edi
push 1
push 0xc0000000
mov byte [ebp - 4], 5
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
call esi
cmp edi, 0xffffffff
jne 0x100398a8
push dword [ebp + 0xc]
call esi
push eax
lea eax, [ebp - 0x28]
push str._cannot_OutputFile__LE_d_:__s
push eax
call fcn.1003a800
add esp, 0x10
mov byte [ebp - 4], 6
mov edx, dword [eax]
call fcn.100394f0
mov byte [ebp - 4], 5
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100398a8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, ebx
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov dword [ebp - 0x2c], 1
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100398cf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp edi, 0xffffffff
je 0x10039a29
mov eax, dword [0x100b31f8]
mov dword [ebp - 0x30], 0
test al, 1
jne 0x10039921
or eax, 1
mov dword [0x100b31f8], eax
push ecx
mov ecx, esp
mov byte [ebp - 4], 7
mov esi, 0x5c
call fcn.1003a230
mov edx, esi
mov ecx, 0x100b31fc
call fcn.1003a890
add esp, 4
push 0x10088370
call fcn.1006ad6f
add esp, 4
mov byte [ebp - 4], 1
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x20], ax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x20]
push eax
movq qword [ebp - 0x1e], xmm0
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push dword [ebp + 0xc]
push dword [0x100b31fc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
movzx eax, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x16]
push eax
movzx eax, word [ebp - 0x18]
push eax
movzx eax, word [ebp - 0x1a]
push eax
movzx eax, word [ebp - 0x1e]
push eax
lea eax, [ebp - 0x28]
push str._02d__02d__02d:_02d:_02d._03d__PID_d_TID_d__Native._s:__s:__s_r_n
push eax
call fcn.1003a800
add esp, 0x34
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.1002b5c0
push 2
push 0
push 0
push edi
mov byte [ebp - 4], 9
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x24]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x100399c1
push esi
lea ecx, [ebp - 0x24]
call fcn.1002b920
mov eax, dword [ebp - 0x24]
push 0
lea ecx, [ebp - 0x30]
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x100b0fd8]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [ebp - 0x2c], 0
je 0x100399e9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 8
mov ecx, ebx
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10039a09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10039a29
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_SetLastError]
popal
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov edx, dword [ebp + 8]
mov ecx, esi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10039a56
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x10039a77
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1006abfd
mov esp, ebp
pop ebp
ret