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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffa0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1060], ebx
mov dword [ebp - 0x105c], ebx
mov dword [ebp - 0x10], ebx
mov esi, dword [ebp + 0xc]
lea edi, [ebp - 0x820]
push ecx
mov ecx, 0x200
rep movsd dword es:[edi], dword [esi]
pop ecx
mov word [ebp - 8], cx
mov word [ebp - 6], dx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x485592
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x40
lea eax, [ebp - 0x1020]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile
movzx ecx, word [ebp - 8]
mov eax, ecx
mov ebx, 0x37
xor edx, edx
div ebx
mov dword [ebp - 0x18], eax
mov eax, ecx
mov ecx, 0x37
xor edx, edx
div ecx
test edx, edx
je 0x48523e
inc dword [ebp - 0x18]
xor eax, eax
push ebp
push 0x48555b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x485551
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x18]
dec eax
cmp eax, dword [ebp - 0x14]
jg 0x48527d
movzx eax, word [ebp - 8]
mov ecx, 0x37
xor edx, edx
div ecx
test edx, edx
jne 0x485284
mov esi, 0x37
jmp 0x485293
movzx eax, word [ebp - 8]
mov ecx, 0x37
xor edx, edx
div ecx
mov esi, edx
mov edx, 0x4855a8
lea eax, [ebp - 0x1024]
call fcn.00402c68
lea eax, [ebp - 0x1028]
mov edx, esi
add dl, 9
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1028]
lea eax, [ebp - 0x1024]
mov cl, 2
call fcn.00402c38
lea edx, [ebp - 0x1024]
lea eax, [ebp - 0x102c]
call fcn.00402c68
lea eax, [ebp - 0x1028]
mov dl, byte [ebp + 8]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1028]
lea eax, [ebp - 0x102c]
mov cl, 3
call fcn.00402c38
lea edx, [ebp - 0x102c]
lea eax, [ebp - 0x1034]
call fcn.00402c68
mov edx, 0x4855a8
lea eax, [ebp - 0x1034]
mov cl, 4
call fcn.00402c38
lea edx, [ebp - 0x1034]
lea eax, [ebp - 0x103c]
call fcn.00402c68
lea eax, [ebp - 0x1028]
movzx ebx, word [ebp - 6]
imul edx, dword [ebp - 0x14], 0x37
add ebx, edx
mov edx, ebx
and edx, 0x800000ff
jns 0x485350
dec edx
or edx, 0xffffff00
inc edx
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1028]
lea eax, [ebp - 0x103c]
mov cl, 5
call fcn.00402c38
lea edx, [ebp - 0x103c]
lea eax, [ebp - 0x1044]
call fcn.00402c68
lea eax, [ebp - 0x1028]
mov edx, ebx
test edx, edx
jns 0x48538c
add edx, 0xff
sar edx, 8
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1028]
lea eax, [ebp - 0x1044]
mov cl, 6
call fcn.00402c38
lea edx, [ebp - 0x1044]
lea eax, [ebp - 0x104c]
call fcn.00402c68
lea eax, [ebp - 0x1028]
mov edx, esi
and edx, 0x800000ff
jns 0x4853d1
dec edx
or edx, 0xffffff00
inc edx
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1028]
lea eax, [ebp - 0x104c]
mov cl, 7
call fcn.00402c38
lea edx, [ebp - 0x104c]
lea eax, [ebp - 0x1058]
call fcn.00402c68
lea eax, [ebp - 0x1028]
mov edx, esi
test edx, edx
jns 0x48540d
add edx, 0xff
sar edx, 8
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1028]
lea eax, [ebp - 0x1058]
mov cl, 8
call fcn.00402c38
lea edx, [ebp - 0x1058]
lea eax, [ebp - 0x10]
call fcn.00404398
mov edi, esi
dec edi
test edi, edi
jl 0x485471
inc edi
xor ebx, ebx
lea eax, [ebp - 0x105c]
movzx edx, word [ebp - 6]
imul ecx, dword [ebp - 0x14], 0x37
add edx, ecx
add edx, ebx
mov dl, byte [ebp + edx - 0x820]
call fcn.0040431c
mov edx, dword [ebp - 0x105c]
lea eax, [ebp - 0x10]
call fcn.004043fc
inc ebx
dec edi
jne 0x485441
lea ecx, [esi + 9]
mov edx, 1
mov eax, dword [ebp - 0x10]
call fcn.00483bdc
mov edx, eax
lea eax, [ebp - 0x1060]
call fcn.0040431c
mov edx, dword [ebp - 0x1060]
lea eax, [ebp - 0x10]
call fcn.004043fc
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x10]
call fcn.004043f4
push eax
mov eax, dword [ebp - 0x10]
call fcn.004045f4
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
jne 0x4854c6
call fcn.0040bdbc
mov ebx, 0x15
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0x32
call sub.kernel32.dll_Sleep
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x40
lea eax, [ebp - 0x1020]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x4854f8
call fcn.0040bdbc
cmp dword [ebp - 0x1c], 0
ja 0x485501
dec ebx
jne 0x4854cb
cmp byte [ebp - 0x1020], 0x81
je 0x48550f
call fcn.0040bdbc
movzx esi, byte [ebp - 0x101f]
mov ecx, esi
sub ecx, 2
xor edx, edx
lea eax, [ebp - 0x1020]
call fcn.00483c3c
cmp al, byte [ebp + esi - 0x1021]
je 0x485536
call fcn.0040bdbc
cmp byte [ebp + esi - 0x1022], 1
je 0x485545
call fcn.0040bdbc
inc dword [ebp - 0x14]
dec dword [ebp - 0x20]
jne 0x485263
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x48556c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x485599
lea eax, [ebp - 0x1060]
mov edx, 2
call fcn.00404158
lea eax, [ebp - 0x10]
call fcn.00404134
ret