Function at 0x10002780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x10043040]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
push esi
mov esi, dword [0x1004b21c]
push edi
test esi, esi
je 0x10002a5d
call fcn.100022a0
mov ecx, eax
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
mov eax, dword [ecx]
push 0
push 0
push dword [ecx + 4]
or eax, 2
push eax
call fcn.1002192c
add esp, 0x1c
cmp esi, 1
mov esi, eax
jne 0x100027e1
or eax, 0xffffffff
test esi, esi
cmovs esi, eax
jmp 0x100027ea
or eax, 0xffffffff
test esi, esi
cmovs esi, eax
inc esi
push esi
call fcn.10015dbe
add esp, 4
mov edi, eax
push esi
push 0
push edi
call fcn.10017a30
add esp, 0xc
lea eax, [ebp + 0x10]
mov edx, esi
mov ecx, edi
push eax
push dword [ebp + 0xc]
push 0xffffffffffffffff
call fcn.10002370
mov eax, dword [0x1004b21c]
add esp, 0xc
cmp eax, 1
jne 0x100028cb
push 0x100494e8
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
push 0
push 0x40000000
push 4
push 0
push 2
push 0x40000000
push 0x1004a2f8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10002a49
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x100028bf
mov dword [esp + 0x24], eax
xorps xmm0, xmm0
lea eax, [esp + 0x14]
movlpd qword [esp + 0x14], xmm0
push eax
push 0
push esi
push edi
push ebx
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x34], 0xffffffff
mov byte [edi + esi - 1], 0xa
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xffffffffffffffff
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push dword [esp + 0x10]
call esi
jmp 0x10002a49
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10002a49
cmp eax, 2
jne 0x10002a54
push 0x100494e8
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp esi, 1
jne 0x10002975
push 0xc
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x1000295c
push 0x208
push eax
lea eax, [esp + 0x30]
push eax
call fcn.10017a30
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
call esi
push eax
push str._r_nSetConsoleTextAttribute_Failed__Error:__lu_n
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push 0x104
push eax
call fcn.10002350
add esp, 0x14
lea eax, [esp + 0x28]
push eax
push 0x100371b4
call fcn.100022b0
add esp, 8
push edi
push 0x100371bc
call fcn.100022e0
add esp, 8
jmp 0x100029f7
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0x100371bc
call fcn.100022e0
add esp, 8
jmp 0x100029f7
cmp esi, 2
jne 0x100029df
push 9
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x100029df
push 0x208
push eax
lea eax, [esp + 0x30]
push eax
call fcn.10017a30
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
call esi
push eax
push str._r_nSetConsoleTextAttribute_Failed__Error:__lu_n
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push 0x104
push eax
call fcn.10002350
add esp, 0x14
lea eax, [esp + 0x28]
push eax
push 0x100371b4
call fcn.100022b0
push edi
push 0x100371bc
call fcn.100022e0
add esp, 0x10
jmp 0x100029f7
push edi
push 0x100371bc
call fcn.100022e0
add esp, 8
test esi, esi
je 0x10002a49
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 7
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x10002a49
push 0x208
push eax
lea eax, [esp + 0x30]
push eax
call fcn.10017a30
add esp, 0xc
call esi
push eax
push str._r_nSetConsoleTextAttribute_Failed__Error:__lu_n
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push 0x104
push eax
call fcn.10002350
add esp, 0x14
lea eax, [esp + 0x28]
push eax
push 0x100371b4
call fcn.100022b0
add esp, 8
push 0x100494e8
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push edi
call fcn.10015c61
add esp, 4
mov ecx, dword [esp + 0x234]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10015c53
mov esp, ebp
pop ebp
ret