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

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 3
add esp, 0xfffff004
push eax
dec eax
jne 0x417779
mov eax, dword [ebp - 4]
add esp, 0xfffff7dc
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov eax, 0x4f05ac
call fcn.004d57f0
mov word [ebp - 0x14], 8
mov ax, word [0x4ed314]
cmp ax, 0x5f
je 0x4177bd
cmp ax, 0x62
je 0x4177bd
cmp ax, 0x63
jne 0x4177d9
mov dword [0x4f0534], 0xfffff448
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
test ebx, ebx
jne 0x4177f9
mov dword [0x4f0534], 0xfffff447
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
mov cl, byte [ebx]
test cl, cl
jne 0x41781b
mov dword [0x4f0534], 0xfffff446
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
push ebx
push 0x5e6192
lea ecx, [ebp - 0x3828]
push ecx
call fcn.004d75f8
add esp, 0xc
xor esi, esi
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x3828]
push eax
call sub.KERNEL32.dll_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4178de
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xe7
je 0x41789c
cmp esi, 5
jge 0x41787b
inc esi
push 1
call fcn.004dee84
pop ecx
push 0
call sub.KERNEL32.dll_Sleep
jmp 0x417832
mov dword [0x4f0534], 0xfffff433
mov dword [0x4f0538], eax
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
push 0x7530
lea ecx, [ebp - 0x3828]
push ecx
call fcn.00416e40
add esp, 8
test eax, eax
jne 0x417832
mov dword [0x4f0534], 0xfffff43d
call sub.KERNEL32.dll_GetLastError
mov dword [0x4f0538], eax
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x41796e
test edi, edi
jne 0x4178f9
mov eax, dword [ebp + 0xc]
push eax
call fcn.004d2f1c
pop ecx
mov edi, eax
cmp edi, 0x1c00
jle 0x417906
mov edi, 0x1c00
push edi
mov eax, dword [ebp + 0xc]
push eax
lea edx, [ebp - 0x3828]
push edx
call fcn.004d2d2c
add esp, 0xc
push edi
lea ecx, [ebp - 0x3828]
push ecx
call fcn.00416e6c
add esp, 8
lea edx, [ebp - 0x28]
push 0
push edx
push eax
lea eax, [ebp - 0x3828]
push eax
push ebx
call sub.KERNEL32.dll_WriteFile
test eax, eax
jne 0x41796e
mov dword [0x4f0534], 0xfffff429
call sub.KERNEL32.dll_GetLastError
mov dword [0x4f0538], eax
push ebx
call sub.KERNEL32.dll_CloseHandle
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
push 0xa
call sub.KERNEL32.dll_Sleep
push 0
call sub.KERNEL32.dll_Sleep
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4179e2
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x417991
mov dword [ebp + 0x18], 0x1c00
push 0
lea edx, [ebp - 0x28]
push edx
mov ecx, dword [ebp + 0x18]
push ecx
mov eax, dword [ebp + 0x14]
push eax
push ebx
call sub.KERNEL32.dll_ReadFile
test eax, eax
jne 0x4179d2
mov dword [0x4f0534], 0xfffff41f
call sub.KERNEL32.dll_GetLastError
mov dword [0x4f0538], eax
push ebx
call sub.KERNEL32.dll_CloseHandle
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
mov ecx, dword [ebp - 0x28]
push ecx
mov eax, dword [ebp + 0x14]
push eax
call fcn.00416fb0
add esp, 8
push ebx
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x417a2d
mov esp, ebp
mov edi, dword [ebp - 0x3834]
mov esi, dword [ebp - 0x3830]
mov ebx, dword [ebp - 0x382c]
pop ebp
ret