Function at 0x10044b3
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
sub esp, 0x828
push ebx
push ebp
push esi
push edi
push 0x400
lea eax, [esp + 0x3c]
xor esi, esi
push eax
mov word [esp + 0x40], si
call fcn.01006d72
lea eax, [esp + 0x38]
push 0x10016e4
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
lea eax, [esp + 0x38]
push eax
push esi
push 0x100002
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
cmp eax, esi
mov dword [0x1009714], eax
jne 0x1004515
lea eax, [esp + 0x38]
push eax
push 1
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov dword [0x1009714], eax
jmp 0x100451e
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [esp + 0x83c]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
xor eax, eax
cmp dword [esp + 0x840], esi
mov ebp, 0xc0000000
setne al
inc eax
inc eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x1c], eax
push 1
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x20], 0xc
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push esi
push esi
push 1
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push esi
push 0x80
push dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
push 1
push ebp
push edi
call ebx
cmp dword [esp + 0x840], esi
mov dword [0x1009710], eax
je 0x10045fd
cmp eax, 0xffffffff
push esi
jne 0x1004662
push 0x80
push 1
lea eax, [esp + 0x24]
push eax
push 1
push ebp
push edi
call ebx
cmp eax, 0xffffffff
mov dword [0x1009710], eax
je 0x1004606
push esi
lea ecx, [esp + 0x18]
push ecx
push 2
push 0x1009004
push eax
mov dword [0x100971c], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0x10012ec
push edi
call fcn.0100435f
mov dword [esp], 0x40001026
call fcn.010042d3
push edi
call fcn.0100435f
pop ecx
pop ecx
jmp 0x10046aa
cmp eax, 0xffffffff
jne 0x10046c4
cmp dword [esp + 0x844], esi
je 0x10046bc
push 0xd3
call fcn.01006d4e
push eax
call fcn.01003c77
mov dword [esp], 0x104
push edi
call dword [sym.imp.msvcrt.dll__wgetcwd]
pop ecx
pop ecx
push edi
push esi
call fcn.010020e1
test eax, eax
jne 0x1004657
push 0xd2
call fcn.01006d4e
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01003b61
pop ecx
pop ecx
push edi
call fcn.0100449f
jmp 0x1004542
push esi
push esi
push eax
mov dword [esp + 0x20], esi
mov dword [0x100971c], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [0x1009710]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10046aa
mov ax, word [esp + 0x10]
cmp ax, word [0x1009004]
jne 0x10046aa
mov dword [0x100971c], 1
push 2
push esi
push esi
push dword [0x1009710]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1004701
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
lea ecx, [esp + 0x18]
push ecx
push 2
push 0x1009004
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0x10012ec
push edi
mov dword [0x100971c], 1
call fcn.0100435f
mov dword [esp], 0x40001026
call fcn.010042d3
push edi
call fcn.0100435f
pop ecx
pop ecx
push 1
push esi
push esi
push dword [0x1009710]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
pop esi
pop ebp
mov dword [0x1009718], eax
pop ebx
add esp, 0x828
ret 0xc