Function at 0x101d0efc
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x10274398]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 8]
cmp eax, 1
jbe 0x101d0f47
cmp eax, 2
je 0x101d0f3e
cmp eax, 3
je 0x101d0f35
cmp eax, 4
jne 0x101d11fd
cmp dword [0x1027c1b4], eax
jmp 0x101d0f4e
cmp dword [0x1027c1b4], 3
jmp 0x101d0f4e
cmp dword [0x1027c1b4], 2
jmp 0x101d0f4e
cmp dword [0x1027c1b4], 1
jl 0x101d11fd
push edi
xor edi, edi
cmp word [0x1027bfa8], di
jne 0x101d0f67
push edi
call fcn.101d0d41
pop ecx
push ebx
lea ecx, [ebp - 0x64]
call fcn.101d0b1b
push edi
push 0x80
push 4
push edi
push edi
push 0xc0000000
push 0x1027bfa8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x6c], ebx
cmp ebx, 0xffffffff
je 0x101d11f3
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 0x60]
push eax
push 2
lea eax, [ebp - 0x70]
push eax
push ebx
mov dword [ebp - 0x64], edi
call esi
test eax, eax
je 0x101d0fbf
mov eax, 0xfeff
cmp ax, word [ebp - 0x70]
je 0x101d0fc6
mov dword [ebp - 0x64], 1
push edi
lea eax, [ebp - 0x60]
push eax
push 0x36
lea eax, [ebp - 0x3c]
push eax
push ebx
call esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x64], edi
jne 0x101d1026
cmp eax, edi
je 0x101d1026
cmp dword [ebp - 0x60], 0x36
jb 0x101d1026
push 0xf
lea eax, [ebp - 0x3c]
push str._AhnInstLog1.0
push eax
call fcn.101d3a45
add esp, 0xc
test eax, eax
jne 0x101d1026
lea eax, [ebp - 0x1e]
push eax
call fcn.101d1b9e
pop ecx
mov dword [ebp - 0x68], eax
cmp eax, 0x36
jb 0x101d1026
cmp eax, 0x600000
jbe 0x101d10a5
mov dword [ebp - 0x68], 0x6c
jmp 0x101d10a5
push edi
push edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
lea eax, [ebp - 0x60]
push eax
push 2
lea eax, [ebp - 0x68]
push eax
push ebx
mov dword [ebp - 0x68], 0xfeff
call esi
push 0x36
push str._AhnInstLog1.0
push 0x1026b2a0
lea eax, [ebp - 0x3c]
push 0x1c
push eax
call fcn.1001d140
add esp, 0x14
push edi
lea eax, [ebp - 0x60]
push eax
push 0x36
lea eax, [ebp - 0x3c]
push eax
push ebx
call esi
mov dword [ebp - 0x64], 0x19
push edi
lea eax, [ebp - 0x60]
push eax
push 2
push 0x1026b29c
push ebx
call esi
dec dword [ebp - 0x64]
jne 0x101d107b
push edi
lea eax, [ebp - 0x60]
push eax
push 4
push 0x1026b294
push ebx
call esi
mov dword [ebp - 0x68], 0x6e
push edi
push edi
push dword [ebp - 0x68]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 0x60]
push eax
mov eax, dword [0x1027bfa4]
add eax, eax
push eax
push 0x1027bf84
push ebx
call esi
test byte [0x1027c1c0], 1
mov ebx, dword [ebp - 0x60]
je 0x101d1115
mov dword [ebp - 0x64], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push 0x1026b284
lea eax, [ebp - 0x5c]
push 0x10
push eax
call fcn.1001d140
add esp, 0x10
lea eax, [ebp - 0x64]
push eax
push 0x10
lea eax, [ebp - 0x5c]
push eax
call fcn.101d0c2e
push edi
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x64]
add eax, eax
push eax
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x6c]
call esi
add ebx, dword [ebp - 0x60]
mov dword [ebp - 0x64], edi
cmp dword [0x1027c1b0], edi
jbe 0x101d1142
push edi
lea eax, [ebp - 0x60]
push eax
push 2
push 0x1026b280
push dword [ebp - 0x6c]
call esi
add ebx, dword [ebp - 0x60]
inc dword [ebp - 0x64]
mov eax, dword [ebp - 0x64]
cmp eax, dword [0x1027c1b0]
jb 0x101d1120
lea eax, [ebp - 0x64]
push eax
push 0x400
push dword [ebp - 0x74]
mov dword [ebp - 0x64], edi
call fcn.101d0c2e
push edi
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x64]
add eax, eax
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x6c]
call esi
add ebx, dword [ebp - 0x60]
push edi
lea eax, [ebp - 0x60]
push eax
push 4
push 0x1026b294
push dword [ebp - 0x6c]
call esi
mov eax, dword [ebp - 0x60]
add ebx, eax
add dword [ebp - 0x68], ebx
mov ebx, dword [ebp - 0x6c]
push edi
lea eax, [ebp - 0x60]
push eax
push 0x1e
push str._EOL__r_n_r_n
push ebx
call esi
cmp dword [ebp - 0x68], 0x5ff800
jbe 0x101d11a7
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
push edi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x68]
lea eax, [ebp - 0x3c]
push str._AhnInstLog1.0
push str._s_010u_r_n
push 0x1c
push eax
call fcn.1001d140
add esp, 0x14
push edi
lea eax, [ebp - 0x60]
push eax
push 0x36
lea eax, [ebp - 0x3c]
push eax
push ebx
call esi
test byte [0x1027c1c0], 2
pop esi
je 0x101d11ec
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x64]
call fcn.101d0b3d
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101d14d7
leave
ret