Function at 0x489de0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
push edi
mov edi, dword [esi + 8]
test edi, edi
mov dword [esp + 8], edx
jne 0x489e38
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edx, dword [edx]
push 0x63
push edi
push eax
push esi
call fcn.004ed570
cmp eax, 1
jne 0x48a217
mov ecx, dword [esi + 8]
cmp ecx, eax
je 0x48a217
cmp ecx, 3
je 0x48a217
push 6
mov edx, edi
mov ecx, esi
call fcn.004764c0
pop edi
pop esi
add esp, 0xc
ret 0x18
mov eax, dword [esi + 0x40]
test eax, eax
je 0x489e5a
cmp edi, 2
jl 0x489e4b
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x489e5a
cmp edi, 3
jne 0x489e67
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx + 0x40]
test edx, edx
jne 0x489e67
pop edi
mov eax, 2
pop esi
add esp, 0xc
ret 0x18
mov edx, dword [eax + 0x1c]
mov ecx, 1
cmp edx, ecx
jne 0x489e90
cmp edi, 2
jl 0x489e80
mov edx, dword [eax + 0x40]
cmp dword [edx + 0x1c], ecx
jne 0x489e90
cmp edi, 3
jne 0x489e9a
mov edx, dword [eax + 0x40]
mov edx, dword [edx + 0x40]
cmp dword [edx + 0x1c], ecx
je 0x489e9a
pop edi
mov eax, ecx
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [eax + 0xc]
test ecx, ecx
push ebx
push ebp
jne 0x48a1d9
cmp edi, 2
jl 0x489eba
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x48a1d9
cmp edi, 3
jne 0x489ed0
mov edx, dword [eax + 0x40]
mov ecx, dword [edx + 0x40]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x48a1d9
cmp dword [esp + 0x30], 1
jne 0x489ef5
cmp edi, 1
je 0x489ef5
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
push 6
call fcn.004764c0
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [eax]
call fcn.004ed2a0
test eax, eax
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
mov edx, dword [edi + 0x40]
je 0x489f77
mov eax, dword [edx]
push eax
call fcn.00563a6c
add esp, 4
test eax, eax
jne 0x489f49
mov eax, dword [0x597648]
xor ecx, ecx
test eax, eax
je 0x489f30
mov eax, dword [eax + 0x174]
inc ecx
test eax, eax
jne 0x489f25
push ecx
mov ecx, dword [esp + 0x28]
push 0x5748f8
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x48a1d9
mov esi, dword [0x597648]
test esi, esi
je 0x489f9e
dec eax
test eax, eax
jle 0x489fbc
mov esi, dword [esi + 0x174]
test esi, esi
jne 0x489f53
push 6
mov edx, ebx
mov ecx, edi
call fcn.004764c0
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [edx]
mov edx, ebx
jmp 0x489f80
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x489f80
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x489f90
sub eax, edx
cmp eax, 0x5a
jbe 0x489fb3
push 6
mov edx, ebx
mov ecx, edi
call fcn.004764c0
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, ebx
call fcn.00488a40
mov esi, eax
test esi, esi
je 0x489f9e
xor eax, eax
mov dword [0x59764c], esi
mov ecx, 0xf9
mov edi, ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x20]
cmp dword [eax + 8], 2
mov dword [esp + 0x2c], 0
mov ebp, 0x3b5
jl 0x48a087
mov edi, eax
mov ecx, dword [edi + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx]
push eax
call fcn.00563a6c
mov ebp, eax
add esp, 4
cmp ebp, 1
jb 0x489f9e
cmp dword [edi + 8], 3
jne 0x48a074
mov ecx, dword [edi + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
cmp byte [ecx], 0x26
jne 0x489f9e
mov eax, ecx
lea edx, [eax + 1]
mov dword [esp + 0x2c], edx
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x48a030
sub eax, dword [esp + 0x2c]
cmp eax, 2
jb 0x489f9e
mov eax, dword [esp + 0x34]
push eax
mov edx, ebp
call fcn.0041afc0
mov edi, eax
test edi, edi
jne 0x48a06d
mov ecx, dword [esp + 0x20]
push 8
mov edx, ebx
call fcn.004764c0
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ebx, dword [edi + 0xc]
add ebx, dword [edi]
jmp 0x48a08b
cmp ebp, 0x3b5
mov edi, dword [esp + 0x2c]
jbe 0x48a08b
mov ebp, 0x3b5
jmp 0x48a08b
mov edi, dword [esp + 0x2c]
cmp dword [esp + 0x30], 1
jne 0x48a097
mov ebp, 1
mov ecx, dword [esi + 0x168]
xor eax, eax
push eax
push eax
mov edx, 1
mov dword [esi + 0x170], eax
mov dword [esi + 0x16c], eax
call fcn.00488fc0
mov dword [esp + 0x14], eax
and eax, edx
cmp eax, 0xffffffff
mov dword [esp + 0x18], edx
jne 0x48a0d5
mov dword [esi + 0x170], 1
jmp 0x48a1d9
push 0
lea ecx, [esp + 0x2c]
push ecx
push ebp
mov dword [esp + 0x34], 0
mov edx, dword [esi + 0x168]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x48a106
mov dword [esi + 0x170], 1
jmp 0x48a1d9
test edi, edi
je 0x48a111
mov eax, dword [esp + 0x28]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x48a128
mov dword [esi + 0x16c], 1
jmp 0x48a1d9
mov ecx, dword [esp + 0x30]
mov ebp, 1
cmp ecx, ebp
jne 0x48a151
movzx ecx, byte [ebx]
mov edx, dword [esp + 0x24]
push ecx
push 0x5748f8
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x48a1d9
test edi, edi
je 0x48a16b
push eax
mov eax, dword [esp + 0x28]
push 0x5748ec
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x48a1d9
mov edi, dword [esp + 0x24]
mov edx, edi
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x48a175
push 0xd
push edi
call fcn.00563730
add esp, 8
test eax, eax
je 0x48a191
mov byte [eax], 0
push 0xa
push edi
call fcn.00563730
add esp, 8
test eax, eax
je 0x48a1a3
mov byte [eax], 0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x168]
push edx
xor edx, edx
call fcn.00488fc0
and eax, edx
cmp eax, 0xffffffff
jne 0x48a1c9
mov dword [esi + 0x170], ebp
jmp 0x48a1d9
push 0
push ebp
push 0
push 2
xor edx, edx
mov ecx, esi
call fcn.00489010
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 8]
test eax, eax
jle 0x48a209
mov edi, dword [esp + 0x10]
jmp 0x48a1f0
mov edx, dword [esi + 0x40]
mov ecx, dword [edi]
call fcn.004c2730
mov dword [edi], eax
mov ecx, dword [esi + 8]
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 8], ecx
jg 0x48a1f0
pop ebp
mov dword [esi + 8], 0
mov eax, 2
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18