Function at 0x48ed40
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 0x48ed98
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edx, dword [edx]
push 0x63
push edi
push eax
push esi
call fcn.004f48e0
cmp eax, 1
jne 0x48f177
mov ecx, dword [esi + 8]
cmp ecx, eax
je 0x48f177
cmp ecx, 3
je 0x48f177
push 6
mov edx, edi
mov ecx, esi
call fcn.00479d70
pop edi
pop esi
add esp, 0xc
ret 0x18
mov eax, dword [esi + 0x40]
test eax, eax
je 0x48edba
cmp edi, 2
jl 0x48edab
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x48edba
cmp edi, 3
jne 0x48edc7
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx + 0x40]
test edx, edx
jne 0x48edc7
pop edi
mov eax, 2
pop esi
add esp, 0xc
ret 0x18
mov edx, dword [eax + 0x1c]
mov ecx, 1
cmp edx, ecx
jne 0x48edf0
cmp edi, 2
jl 0x48ede0
mov edx, dword [eax + 0x40]
cmp dword [edx + 0x1c], ecx
jne 0x48edf0
cmp edi, 3
jne 0x48edfa
mov edx, dword [eax + 0x40]
mov edx, dword [edx + 0x40]
cmp dword [edx + 0x1c], ecx
je 0x48edfa
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 0x48f139
cmp edi, 2
jl 0x48ee1a
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x48f139
cmp edi, 3
jne 0x48ee30
mov edx, dword [eax + 0x40]
mov ecx, dword [edx + 0x40]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x48f139
cmp dword [esp + 0x30], 1
jne 0x48ee55
cmp edi, 1
je 0x48ee55
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
push 6
call fcn.00479d70
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [eax]
call fcn.004f4600
test eax, eax
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
mov edx, dword [edi + 0x40]
je 0x48eed7
mov eax, dword [edx]
push eax
call fcn.005705cb
add esp, 4
test eax, eax
jne 0x48eea9
mov eax, dword [0x5a8b9c]
xor ecx, ecx
test eax, eax
je 0x48ee90
mov eax, dword [eax + 0x174]
inc ecx
test eax, eax
jne 0x48ee85
push ecx
mov ecx, dword [esp + 0x28]
push 0x583948
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x48f139
mov esi, dword [0x5a8b9c]
test esi, esi
je 0x48eefe
dec eax
test eax, eax
jle 0x48ef1c
mov esi, dword [esi + 0x174]
test esi, esi
jne 0x48eeb3
push 6
mov edx, ebx
mov ecx, edi
call fcn.00479d70
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [edx]
mov edx, ebx
jmp 0x48eee0
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x48eee0
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x48eef0
sub eax, edx
cmp eax, 0x5a
jbe 0x48ef13
push 6
mov edx, ebx
mov ecx, edi
call fcn.00479d70
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, ebx
call fcn.0048d970
mov esi, eax
test esi, esi
je 0x48eefe
xor eax, eax
mov dword [0x5a8ba0], 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 0x48efe7
mov edi, eax
mov ecx, dword [edi + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx]
push eax
call fcn.005705cb
mov ebp, eax
add esp, 4
cmp ebp, 1
jb 0x48eefe
cmp dword [edi + 8], 3
jne 0x48efd4
mov ecx, dword [edi + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
cmp byte [ecx], 0x26
jne 0x48eefe
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 0x48ef90
sub eax, dword [esp + 0x2c]
cmp eax, 2
jb 0x48eefe
mov eax, dword [esp + 0x34]
push eax
mov edx, ebp
call fcn.0041bc00
mov edi, eax
test edi, edi
jne 0x48efcd
mov ecx, dword [esp + 0x20]
push 8
mov edx, ebx
call fcn.00479d70
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ebx, dword [edi + 0xc]
add ebx, dword [edi]
jmp 0x48efeb
cmp ebp, 0x3b5
mov edi, dword [esp + 0x2c]
jbe 0x48efeb
mov ebp, 0x3b5
jmp 0x48efeb
mov edi, dword [esp + 0x2c]
cmp dword [esp + 0x30], 1
jne 0x48eff7
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.0048df30
mov dword [esp + 0x14], eax
and eax, edx
cmp eax, 0xffffffff
mov dword [esp + 0x18], edx
jne 0x48f035
mov dword [esi + 0x170], 1
jmp 0x48f139
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 0x48f066
mov dword [esi + 0x170], 1
jmp 0x48f139
test edi, edi
je 0x48f071
mov eax, dword [esp + 0x28]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x48f088
mov dword [esi + 0x16c], 1
jmp 0x48f139
mov ecx, dword [esp + 0x30]
mov ebp, 1
cmp ecx, ebp
jne 0x48f0b1
movzx ecx, byte [ebx]
mov edx, dword [esp + 0x24]
push ecx
push 0x583948
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x48f139
test edi, edi
je 0x48f0cb
push eax
mov eax, dword [esp + 0x28]
push 0x58393c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x48f139
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 0x48f0d5
push 0xd
push edi
call fcn.00570260
add esp, 8
test eax, eax
je 0x48f0f1
mov byte [eax], 0
push 0xa
push edi
call fcn.00570260
add esp, 8
test eax, eax
je 0x48f103
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.0048df30
and eax, edx
cmp eax, 0xffffffff
jne 0x48f129
mov dword [esi + 0x170], ebp
jmp 0x48f139
push 0
push ebp
push 0
push 2
xor edx, edx
mov ecx, esi
call fcn.0048df80
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 8]
test eax, eax
jle 0x48f169
mov edi, dword [esp + 0x10]
jmp 0x48f150
mov edx, dword [esi + 0x40]
mov ecx, dword [edi]
call fcn.004c7fe0
mov dword [edi], eax
mov ecx, dword [esi + 8]
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 8], ecx
jg 0x48f150
pop ebp
mov dword [esi + 8], 0
mov eax, 2
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18