Function at 0x43c1a6
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
lea edx, [ebp - 0x3c]
mov dword [esp + 4], 8
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
jne 0x43c1ee
call fcn.0043df77
mov dword [esp], str.OpenProcessToken_failed:__s
mov dword [esp + 4], eax
jmp 0x43c23b
xor eax, eax
lea edi, [ebp - 0x40]
mov dword [esp + 4], 1
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call esi
sub esp, 0x14
test eax, eax
jne 0x43c372
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
je 0x43c245
call fcn.0043df77
mov dword [esp], str.GetTokenInformation__pre__failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x43c372
mov edx, dword [ebp - 0x40]
mov dword [esp + 4], edx
mov dword [ebp - 0x4c], edx
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov ebx, eax
test eax, eax
je 0x43c372
mov dword [esp + 0x10], edi
mov edx, dword [ebp - 0x4c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call esi
sub esp, 0x14
test eax, eax
je 0x43c301
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidA]
push esi
push esi
test eax, eax
jne 0x43c2bf
call fcn.0043df77
mov dword [esp], str.Unable_to_convert_SID_to_string:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
xor ecx, ecx
mov dword [ebp - 0x38], ecx
jmp 0x43c31b
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidA]
push edx
push edx
test eax, eax
jne 0x43c2f2
call fcn.0043df77
mov dword [esp], str.Unable_to_convert_string_back_to_SID:__s
xor edi, edi
mov dword [esp + 4], eax
call fcn.0043d9e0
mov dword [ebp - 0x38], edi
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_LocalFree]
push esi
jmp 0x43c31b
xor ecx, ecx
mov dword [ebp - 0x38], ecx
call fcn.0043df77
mov dword [esp], str.GetTokenInformation__real__failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x43c372
lea ebx, [ebp - 0x2c]
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push edx
push edx
test eax, eax
je 0x43c372
xor edi, edi
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
sub esp, 0xc
test eax, eax
je 0x43c372
xor esi, esi
mov dword [ebp - 0x38], 0xc
lea edx, [ebp - 0x38]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], ebx
jmp 0x43c389
call fcn.0043df77
mov dword [esp], str.Could_not_set_security_descriptor:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
xor edx, edx
cmp dword [ebp + 8], 1
je 0x43c3cb
cmp dword [ebp + 8], 2
je 0x43c3d7
cmp dword [ebp + 8], 0
jne 0x43c3ae
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov edi, 3
mov ebx, 0x80000000
mov dword [eax], ecx
jmp 0x43c3e1
mov dword [esp + 8], 0x2b7
mov dword [esp + 4], str.stdfn.c
mov dword [esp], str.FALSE
call dword [0x491228]
mov edi, 2
mov ebx, 0x40000000
jmp 0x43c3e1
mov edi, 4
mov ebx, 4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4c], edx
call fcn.0043adb3
mov dword [esp + 0x10], edi
mov esi, eax
xor eax, eax
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x18], eax
mov edx, dword [ebp - 0x4c]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
sub esp, 0x1c
mov ebx, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
test esi, esi
je 0x43c435
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push edi
cmp ebx, 0xffffffff
jne 0x43c462
call fcn.0043df77
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], str.Could_not_open__s:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x43c4a7
cmp dword [ebp + 8], 1
je 0x43c513
cmp dword [ebp + 8], 2
je 0x43c4f1
xor ecx, ecx
mov dword [esp], ebx
mov dword [esp + 4], ecx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push esi
push esi
mov esi, eax
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
mov dword [esp], esi
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
test eax, eax
jne 0x43c4ae
mov dword [esp], str.Could_not_allocate_buffer_for_reading_file
call fcn.0043d9e0
xor esi, esi
jmp 0x43c56e
xor edx, edx
mov dword [esp + 0x10], edx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 8], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov edx, eax
sub esp, 0x14
mov eax, 0xc8f
test edx, edx
jne 0x43c544
call fcn.0043df77
mov dword [esp], str.I_O_Error:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x43c4a7
xor eax, eax
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
sub esp, 0x14
xor edi, edi
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [eax]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
sub esp, 0x14
test eax, eax
je 0x43c4da
mov eax, 0xc90
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov esi, 1
mov dword [esp + 0x10], ecx
mov dword [esp + 4], 1
mov dword [esp], 1
call fcn.00422f82
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, esi
push ebx
or eax, dword [ebp + 8]
jne 0x43c59a
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp + 0x10]
xor edx, edx
xor ecx, ecx
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret