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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x46e818]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x20]
push esi
push edi
mov edi, dword [ebp + 0x18]
xor esi, esi
push eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x58]
push edi
push eax
mov dword [ebp - 0x4c], ecx
call fcn.00417d10
mov dword [ebp - 0x30], eax
add esp, 0xc
movzx eax, word [edi + 6]
mov edx, eax
mov ecx, eax
imul edx, dword [ebp + 0x14]
neg ecx
and ecx, dword [ebp - 0x58]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], edx
cmp dword [0x4739a8], esi
jne 0x418244
cmp byte [edi + 1], 0
jne 0x418244
imul eax, eax, 0x7f
cmp ecx, eax
cmova ecx, eax
mov dword [ebp - 0x48], ecx
test ecx, ecx
je 0x418559
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x3c], eax
nop dword [eax]
xor esi, esi
cmp edx, ecx
mov dword [ebp - 0x28], esi
mov esi, ecx
movzx ecx, word [edi + 6]
cmovb esi, edx
xor edx, edx
mov dword [ebp - 0x34], esi
mov eax, esi
div ecx
cmp dword [0x4739a8], 0
mov edx, eax
mov dword [ebp - 0x24], edx
je 0x41839a
push dword [ebp - 0x40]
mov eax, ecx
mov ecx, dword [ebp - 0x3c]
cdq
push ecx
push edx
push eax
call fcn.004433c0
test byte [ebp + 0x1c], 1
xorps xmm0, xmm0
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x4c]
movlpd qword [ebp - 0x6c], xmm0
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x38], 0
je 0x41832a
test byte [edi + 0x30], 1
je 0x4182cf
push esi
push 0
push ebx
call fcn.00444360
add esp, 0xc
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
push ebx
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x418313
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x41830a
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x6c]
push eax
push dword [edi + 0x24]
call fcn.004174e0
add esp, 0xc
test eax, eax
jne 0x418313
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x38], eax
cmp dword [ebp - 0x30], 0
je 0x418381
push dword [ebp - 0x38]
push ebx
push dword [ebp - 0x2c]
call fcn.004448a0
add esp, 0xc
jmp 0x418381
cmp dword [ebp - 0x30], 0
je 0x41833d
push esi
push dword [ebp - 0x2c]
push ebx
call fcn.004448a0
add esp, 0xc
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
push ebx
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x418381
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x418378
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x6c]
push eax
push dword [edi + 0x24]
call fcn.004174e0
add esp, 0xc
test eax, eax
jne 0x418381
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x38], eax
cmp dword [ebp - 0x38], esi
jne 0x4184da
mov edx, dword [ebp - 0x24]
mov ecx, 1
mov dword [ebp - 0x28], ecx
jmp 0x4184e0
mov al, byte [edi + 1]
cmp al, 0x20
jne 0x418486
cmp word [edi + 0x2c], 0
je 0x4184dd
push 0
push 0x4000000
push 0
push 0
push 0
push 0
push 0x45a854
call dword [0x46f068]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
je 0x4184da
movzx eax, word [edi + 0x2c]
mov ecx, dword [ebp - 0x3c]
sub eax, 0x41
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
mov eax, 2
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
test byte [ebp + 0x1c], al
je 0x41842c
cmp dword [ebp - 0x30], 0
mov eax, 3
mov dword [ebp - 0x50], eax
je 0x41842c
push esi
push dword [ebp - 0x2c]
push ebx
call fcn.004448a0
mov eax, dword [ebp - 0x50]
add esp, 0xc
push 0
lea ecx, [ebp - 0x54]
push ecx
push 0x1c
lea ecx, [ebp - 0x20]
push ecx
push 0x1c
push ecx
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x418458
test byte [ebp - 8], 1
jne 0x418458
mov dword [ebp - 0x28], 1
jmp 0x418462
movzx eax, word [ebp - 0x14]
shr eax, 8
mov dword [edi + 0x38], eax
test byte [ebp + 0x1c], 1
je 0x41847b
cmp dword [ebp - 0x30], 0
je 0x41847b
push esi
push ebx
push dword [ebp - 0x2c]
call fcn.004448a0
add esp, 0xc
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4184da
test al, al
jne 0x4184dd
test byte [ebp + 0x1c], 2
mov esi, 3
je 0x4184f3
cmp dword [ebp - 0x30], 0
je 0x4184b0
push dword [ebp - 0x34]
push dword [ebp - 0x2c]
push ebx
call fcn.004448a0
mov edx, dword [ebp - 0x24]
add esp, 0xc
nop dword [eax]
mov al, byte [edi + 0x28]
sub al, 0x80
movzx eax, al
push eax
push edx
push ebx
push dword [ebp - 0x3c]
call dword [0x4739b8]
test eax, eax
jne 0x418528
mov edx, dword [ebp - 0x24]
sub esi, 1
jne 0x4184b0
mov esi, dword [ebp - 0x34]
mov dword [edi + 0x38], 0xff
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
add dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x30]
adc dword [ebp - 0x40], 0
test eax, eax
je 0x41853c
add dword [ebp - 0x2c], esi
jmp 0x41853e
mov al, byte [edi + 0x28]
sub al, 0x80
movzx eax, al
push eax
push edx
push ebx
push dword [ebp - 0x3c]
call dword [0x4739b4]
test eax, eax
jne 0x418513
mov edx, dword [ebp - 0x24]
sub esi, 1
jne 0x4184f3
cmp dword [ebp - 0x30], 0
je 0x418528
push dword [ebp - 0x34]
push ebx
push dword [ebp - 0x2c]
call fcn.004448a0
add esp, 0xc
test esi, esi
je 0x4184d0
mov esi, dword [ebp - 0x34]
mov ecx, 1
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
jmp 0x4184e0
add ebx, esi
mov edx, dword [ebp - 0x44]
sub edx, esi
mov dword [ebp - 0x44], edx
je 0x418553
test ecx, ecx
mov ecx, dword [ebp - 0x48]
jne 0x418260
mov esi, dword [ebp - 0x28]
pop ebx
jmp 0x41855c
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x41856c
push dword [0x4739b0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00442e5e
mov esp, ebp
pop ebp
ret