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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x10086e84]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
je 0x100019e8
cmp word [eax], di
mov dword [ebp - 8], edi
jne 0x100019ef
mov dword [ebp - 8], 0x80070057
or dword [ebp - 0x18], 0xffffffff
cmp dword [ebp - 8], edi
mov byte [ebp - 9], 0
jl 0x10001a12
lea eax, [ebp - 9]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x18]
push eax
call fcn.10001782
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], edi
mov dword [ebp - 0x1c], edi
jl 0x10001a43
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x10001a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x10001a40
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp dword [ebp - 8], edi
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], edi
jl 0x10001ab0
mov ebx, dword [ebp - 0x1c]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
cmp eax, edi
mov dword [ebp - 0x10], eax
jne 0x10001a6d
mov dword [ebp - 8], 0x8007000e
cmp dword [ebp - 8], edi
jl 0x10001ab0
push edi
lea eax, [ebp - 0x14]
push eax
push ebx
push dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10001a99
cmp dword [ebp - 0x14], ebx
je 0x10001ab0
mov dword [ebp - 8], 0x8000ffff
jmp 0x10001ab0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x10001aad
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
push str.binary_component
mov dword [ebp - 0x14], edi
call fcn.100428f0
xor ebx, ebx
cmp dword [ebp - 8], edi
pop ecx
mov dword [ebp - 0x24], eax
jl 0x10001afa
push dword [ebp + 8]
call fcn.100428d5
cmp byte [ebp - 9], 0
pop ecx
mov ebx, eax
je 0x10001adc
mov edi, dword [ebp - 0x24]
lea edi, [edi + ebx + 5]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x10001afa
mov dword [ebp - 8], 0x8007000e
xor eax, eax
cmp dword [ebp - 8], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
jl 0x10001cc3
call dword [0x10086d18]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
xor esi, esi
cmp byte [ebp - 9], 0
mov byte [eax], 0
je 0x10001b36
mov esi, dword [ebp - 0x24]
push esi
push str.binary_component
push dword [ebp - 0x14]
call fcn.10042570
add esp, 0xc
xor eax, eax
cmp dword [ebp + 8], eax
je 0x10001b6d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x10001b52
xor eax, eax
jmp 0x10001b6d
add eax, eax
mov dword [ebp - 0x24], eax
call fcn.10042980
mov eax, esp
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp + 8]
push eax
call fcn.100010a8
push ebx
push eax
mov eax, dword [ebp - 0x14]
add eax, esi
push eax
call fcn.10042570
lea eax, [esi + ebx]
mov esi, dword [ebp - 0x14]
push 4
add eax, esi
push str..dll
push eax
call fcn.10042570
xor ebx, ebx
add esp, 0x18
cmp dword [ebp - 0x1c], ebx
mov byte [edi + esi - 1], 0xa
jbe 0x10001bf7
mov eax, edi
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
jne 0x10001c03
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
add eax, ebx
mov dl, byte [eax]
add ecx, eax
cmp dl, byte [esi]
mov dword [ebp - 0x28], ecx
jne 0x10001bf1
cmp ecx, dword [ebp - 0x1c]
ja 0x10001bf1
push edi
push esi
push eax
call fcn.10040871
add esp, 0xc
test eax, eax
jne 0x10001bf1
test ebx, ebx
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
je 0x10001bee
mov ecx, dword [ebp - 0x10]
cmp byte [ebx + ecx - 1], 0xa
je 0x10001bee
mov byte [eax], 0
jmp 0x10001bf1
mov dword [ebp - 0x2c], ebx
inc ebx
cmp ebx, dword [ebp - 0x1c]
jb 0x10001ba6
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
je 0x10001cc3
cmp byte [ebp + 0x10], 0
je 0x10001cc3
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x1c]
je 0x10001c32
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 0x10]
lea edx, [eax + edi]
add edx, ecx
push edx
add eax, ecx
push eax
call fcn.10042570
add esp, 0xc
mov eax, dword [ebp - 0x1c]
xor esi, esi
push esi
push esi
push esi
push dword [ebp - 0x18]
sub eax, edi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10001c63
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x10001c60
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp dword [ebp - 8], esi
jl 0x10001cc3
xor esi, esi
push esi
lea eax, [ebp - 0x20]
push eax
push edi
push dword [ebp - 0x10]
mov dword [ebp - 0x20], esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10001c9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x10001c97
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp dword [ebp - 8], esi
jl 0x10001cc3
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10001cc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10001cc0
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp dword [ebp - 0x14], 0
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x10001cdd
push dword [ebp - 0x14]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
cmp dword [ebp - 0x10], 0
je 0x10001cf1
push dword [ebp - 0x10]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
cmp dword [ebp - 0x18], 0xffffffff
je 0x10001d00
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10041ffa
leave
ret