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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov byte [ebp - 9], 0
mov byte [ebp - 0x1b], 0
movsx eax, bl
mov edx, dword [0x48d9a0]
movzx edi, word [edx + eax*2 + 0x4c]
mov eax, dword [ebp + 0xc]
and eax, 0x80000003
jns 0x41b7ea
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
je 0x41b817
movsx eax, bl
mov edx, dword [0x48d878]
cmp byte [edx + eax + 0x26], 1
je 0x41b824
mov eax, dword [ebp + 0xc]
and eax, 0x80000001
jns 0x41b80d
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41b824
cmp byte [ebp - 0x1b], 0
jne 0x41b824
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x41b888
mov eax, edi
imul dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push eax
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x41b874
mov eax, dword [ebp + 0x10]
xor edx, edx
push edx
push eax
mov eax, edi
cdq
call fcn.00404b2c
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
fild qword [ebp - 0x38]
add esp, 0xfffffff8
fistp qword [esp]
wait
call fcn.00412abc
mov edx, eax
mov ax, 0xb
call fcn.0040de10
jmp 0x41bb6b
cmp byte [ebp - 1], 0
je 0x41b888
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18]
call fcn.00405a94
mov eax, dword [ebp - 0x18]
and eax, 0x80000003
jns 0x41b897
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
sete byte [ebp - 0x1a]
lea edx, [ebp - 0x2e]
mov eax, ebx
call fcn.0041a6e4
push 0
call sub.kernel32.dll_SetLastError
cmp byte [ebp - 1], 0
je 0x41b940
cmp byte [0x49a60d], 0
jne 0x41b8e3
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x2e]
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
jmp 0x41b9b3
cmp dword [0x49a604], 0
jne 0x41b938
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x2e]
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
mov dword [0x49a604], esi
cmp byte [0x49a60f], 0
je 0x41b9b3
mov dl, 1
mov eax, esi
call fcn.0041b6a8
test al, al
jne 0x41b9b3
push esi
call sub.kernel32.dll_CloseHandle_1
jmp 0x41bb48
mov esi, dword [0x49a604]
jmp 0x41b9b3
cmp byte [0x49a60e], 0
je 0x41b95a
cmp dword [0x49a608], 0
je 0x41b979
cmp bl, byte [0x49a60c]
je 0x41b979
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x2e]
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
jmp 0x41b9b3
cmp dword [0x49a608], 0
jne 0x41b9ad
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x2e]
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
mov dword [0x49a608], esi
mov byte [0x49a60c], bl
jmp 0x41b9b3
mov esi, dword [0x49a608]
cmp esi, 0xffffffff
jne 0x41b9e9
cmp byte [ebp - 1], 0
jne 0x41b9cc
mov eax, dword [0x48d5f4]
cmp byte [eax], 0
jne 0x41bb48
call sub.kernel32.dll_GetLastError_1
call fcn.0040f5f0
mov edx, dword [0x48da44]
mov eax, dword [ebp + 8]
call fcn.00405c48
jmp 0x41bb48
mov eax, dword [ebp - 8]
call fcn.0040fd30
mov dword [ebp - 0x3c], edi
fild dword [ebp - 0x3c]
fmulp st(1)
mov eax, dword [0x48d318]
fistp qword [eax]
wait
push 0
mov eax, dword [0x48d318]
call fcn.0040fdb8
push eax
mov eax, dword [0x48d318]
push dword [eax + 4]
push dword [eax]
call fcn.0040fdac
push eax
push esi
call sub.kernel32.dll_SetFilePointer_1
call sub.kernel32.dll_GetLastError_1
test eax, eax
jne 0x41ba75
cmp byte [ebp - 1], 0
je 0x41ba54
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 0x10]
imul edi
push eax
mov eax, dword [ebp - 0x18]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
jmp 0x41ba79
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 0x10]
imul edi
push eax
mov eax, dword [ebp - 0x18]
push eax
push esi
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
jmp 0x41ba79
mov byte [ebp - 0x19], 0
movsx eax, bl
mov edx, dword [0x48d878]
cmp byte [edx + eax + 0x26], 0
jne 0x41bad2
cmp byte [ebp - 0x19], 0
jne 0x41baa4
cmp byte [ebp - 0x1a], 0
jne 0x41baa4
cmp byte [ebp - 0x1b], 0
jne 0x41baa4
mov byte [ebp - 0x1b], 1
jmp 0x41b7db
cmp byte [ebp - 0x19], 0
je 0x41bad2
cmp byte [ebp - 0x1b], 0
je 0x41babe
movsx eax, bl
mov edx, dword [0x48d878]
mov byte [edx + eax + 0x26], 1
cmp byte [ebp - 0x1a], 0
jne 0x41bad2
movsx eax, bl
mov edx, dword [0x48d878]
mov byte [edx + eax + 0x26], 2
cmp byte [ebp - 0x19], 0
jne 0x41baf0
call sub.kernel32.dll_GetLastError_1
call fcn.0040f5f0
mov edx, dword [0x48da44]
mov eax, dword [ebp + 8]
call fcn.00405c48
cmp byte [ebp - 1], 0
jne 0x41bb10
cmp byte [0x49a60e], 0
je 0x41bb1f
cmp dword [0x49a608], 0
je 0x41bb10
cmp bl, byte [0x49a60c]
jne 0x41bb1f
cmp byte [ebp - 1], 0
je 0x41bb25
cmp byte [0x49a60d], 0
jne 0x41bb25
push esi
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 0x19], 0
je 0x41bb3f
mov eax, edi
cdq
push edx
push eax
mov eax, dword [ebp + 0x10]
xor edx, edx
call fcn.00404b2c
cmp eax, dword [ebp - 0x10]
jbe 0x41bb43
xor eax, eax
jmp 0x41bb45
mov al, 1
mov byte [ebp - 9], al
cmp dword [ebp - 0x14], 0
jbe 0x41bb6b
cmp byte [ebp - 1], 0
jne 0x41bb62
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
call fcn.00405a94
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_GlobalFree
mov al, byte [ebp - 9]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc