Function at 0x43d7a7
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 0x43d7ef
call fcn.0043f53d
mov dword [esp], str.OpenProcessToken_failed:__s
mov dword [esp + 4], eax
jmp 0x43d83c
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 0x43d973
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
je 0x43d846
call fcn.0043f53d
mov dword [esp], str.GetTokenInformation__pre__failed:__s
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x43d973
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 0x43d973
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 0x43d902
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 0x43d8c0
call fcn.0043f53d
mov dword [esp], str.Unable_to_convert_SID_to_string:__s
mov dword [esp + 4], eax
call fcn.0043efa9
xor ecx, ecx
mov dword [ebp - 0x38], ecx
jmp 0x43d91c
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 0x43d8f3
call fcn.0043f53d
mov dword [esp], str.Unable_to_convert_string_back_to_SID:__s
xor edi, edi
mov dword [esp + 4], eax
call fcn.0043efa9
mov dword [ebp - 0x38], edi
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_LocalFree]
push esi
jmp 0x43d91c
xor ecx, ecx
mov dword [ebp - 0x38], ecx
call fcn.0043f53d
mov dword [esp], str.GetTokenInformation__real__failed:__s
mov dword [esp + 4], eax
call fcn.0043efa9
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x43d973
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 0x43d973
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 0x43d973
xor esi, esi
mov dword [ebp - 0x38], 0xc
lea edx, [ebp - 0x38]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], ebx
jmp 0x43d98a
call fcn.0043f53d
mov dword [esp], str.Could_not_set_security_descriptor:__s
mov dword [esp + 4], eax
call fcn.0043efa9
xor edx, edx
cmp dword [ebp + 8], 1
je 0x43d9cc
cmp dword [ebp + 8], 2
je 0x43d9d8
cmp dword [ebp + 8], 0
jne 0x43d9af
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov edi, 3
mov ebx, 0x80000000
mov dword [eax], ecx
jmp 0x43d9e2
mov dword [esp + 8], 0x2b3
mov dword [esp + 4], str.stdfn.c
mov dword [esp], str.FALSE
call dword [0x494088]
mov edi, 2
mov ebx, 0x40000000
jmp 0x43d9e2
mov edi, 4
mov ebx, 4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4c], edx
call fcn.0043c3f7
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 0x43da36
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 0x43da63
call fcn.0043f53d
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.0043efa9
jmp 0x43daa8
cmp dword [ebp + 8], 1
je 0x43db14
cmp dword [ebp + 8], 2
je 0x43daf2
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 0x43daaf
mov dword [esp], str.Could_not_allocate_buffer_for_reading_file
call fcn.0043efa9
xor esi, esi
jmp 0x43db6f
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 0x43db45
call fcn.0043f53d
mov dword [esp], str.I_O_Error:__s
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x43daa8
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 0x43dadb
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.00422ac2
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, esi
push ebx
or eax, dword [ebp + 8]
jne 0x43db9b
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