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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
xor ebx, ebx
lea esi, [ebx + 1]
cmp esi, ecx
jge 0x48952a
nop
lea edi, [esi*4]
mov eax, dword [edx]
mov eax, dword [eax + edi]
cmp byte [eax], 0x40
je 0x489534
mov ebx, esi
lea esi, [ebx + 1]
cmp esi, ecx
jl 0x489510
add esp, 0x3c
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp + 4], 0x4f0d20
inc eax
mov dword [esp], eax
mov dword [ebp - 0x34], edx
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x1c], eax
test eax, eax
mov edx, dword [ebp - 0x34]
je 0x489760
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0x1c]
mov dword [esp], ecx
mov dword [ebp - 0x34], edx
call sub.msvcrt.dll_fseek
inc eax
mov edx, dword [ebp - 0x34]
je 0x489740
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov ecx, eax
cmp eax, 0xffffffff
mov edx, dword [ebp - 0x34]
je 0x489740
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x38], ecx
call sub.msvcrt.dll_fseek
inc eax
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
je 0x489740
lea eax, [ecx + 1]
mov dword [esp], eax
call fcn.00488278
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x38]
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov ecx, dword [ebp - 0x38]
cmp ecx, eax
mov edx, dword [ebp - 0x34]
je 0x489608
mov ecx, dword [ebp - 0x1c]
test byte [ecx + 0xc], 0x20
jne 0x489740
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax], 0
mov al, byte [ecx]
test al, al
je 0x489644
movzx eax, al
test byte [eax + eax + 0x4f0e40], 0x40
je 0x48976c
mov ecx, dword [ebp - 0x24]
jmp 0x48963d
movzx eax, al
test byte [eax + eax + 0x4f0e40], 0x40
je 0x48976c
inc ecx
mov al, byte [ecx]
test al, al
jne 0x48962c
mov dword [esp], 4
mov dword [ebp - 0x34], edx
call fcn.00488278
mov dword [ebp - 0x28], eax
mov dword [eax], 0
mov edx, dword [ebp - 0x34]
mov eax, dword [edx]
mov dword [esp], eax
mov dword [ebp - 0x34], edx
call fcn.00489120
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x34]
mov dword [edx], eax
test eax, eax
je 0x489798
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
test eax, eax
je 0x489785
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x28]
xor eax, eax
inc eax
lea ecx, [eax*4]
cmp dword [ebx + eax*4], 0
jne 0x489698
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
add eax, dword [ecx]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x34], edx
call fcn.004882ec
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
sub eax, esi
shl eax, 2
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x20]
lea eax, [ecx + esi*4 + 4]
mov dword [esp + 4], eax
add esi, dword [ebp - 0x2c]
lea eax, [ecx + esi*4]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov edx, dword [ebp - 0x34]
mov eax, dword [edx]
add eax, edi
mov edi, eax
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x2c]
lea eax, [ecx + eax - 1]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov dword [ebp - 0x34], edx
call sub.msvcrt.dll_free
mov ecx, dword [ebp - 0x24]
mov dword [esp], ecx
call sub.msvcrt.dll_free
mov esi, ebx
mov edx, dword [ebp - 0x34]
nop
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x34], edx
call sub.msvcrt.dll_fclose
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x34]
mov ebx, esi
jmp 0x489523
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov ebx, esi
jmp 0x489523
mov ecx, dword [ebp - 0x24]
mov dword [esp], ecx
mov dword [ebp - 0x34], edx
call fcn.00489218
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x34]
jmp 0x48965f
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
jmp 0x4896af
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xf
mov dword [esp + 4], 1
mov dword [esp], str._nout_of_memory_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call fcn.00489af8