Function at 0x491290
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 0x4912e8
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edx, dword [edx]
push 0x63
push edi
push eax
push esi
call fcn.00503c20
cmp eax, 1
jne 0x4916c7
mov ecx, dword [esi + 8]
cmp ecx, eax
je 0x4916c7
cmp ecx, 3
je 0x4916c7
push 6
mov edx, edi
mov ecx, esi
call fcn.00480930
pop edi
pop esi
add esp, 0xc
ret 0x18
mov eax, dword [esi + 0x40]
test eax, eax
je 0x49130a
cmp edi, 2
jl 0x4912fb
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x49130a
cmp edi, 3
jne 0x491317
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx + 0x40]
test edx, edx
jne 0x491317
pop edi
mov eax, 2
pop esi
add esp, 0xc
ret 0x18
mov edx, dword [eax + 0x1c]
mov ecx, 1
cmp edx, ecx
jne 0x491340
cmp edi, 2
jl 0x491330
mov edx, dword [eax + 0x40]
cmp dword [edx + 0x1c], ecx
jne 0x491340
cmp edi, 3
jne 0x49134a
mov edx, dword [eax + 0x40]
mov edx, dword [edx + 0x40]
cmp dword [edx + 0x1c], ecx
je 0x49134a
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 0x491689
cmp edi, 2
jl 0x49136a
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x491689
cmp edi, 3
jne 0x491380
mov edx, dword [eax + 0x40]
mov ecx, dword [edx + 0x40]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x491689
cmp dword [esp + 0x30], 1
jne 0x4913a5
cmp edi, 1
je 0x4913a5
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
push 6
call fcn.00480930
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [eax]
call fcn.00503910
test eax, eax
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
mov edx, dword [edi + 0x40]
je 0x491427
mov eax, dword [edx]
push eax
call fcn.0059164b
add esp, 4
test eax, eax
jne 0x4913f9
mov eax, dword [0x5ed444]
xor ecx, ecx
test eax, eax
je 0x4913e0
mov eax, dword [eax + 0x174]
inc ecx
test eax, eax
jne 0x4913d5
push ecx
mov ecx, dword [esp + 0x28]
push 0x5a4998
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x491689
mov esi, dword [0x5ed444]
test esi, esi
je 0x49144e
dec eax
test eax, eax
jle 0x49146c
mov esi, dword [esi + 0x174]
test esi, esi
jne 0x491403
push 6
mov edx, ebx
mov ecx, edi
call fcn.00480930
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, dword [edx]
mov edx, ebx
jmp 0x491430
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x491430
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x491440
sub eax, edx
cmp eax, 0x5a
jbe 0x491463
push 6
mov edx, ebx
mov ecx, edi
call fcn.00480930
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ecx, ebx
call fcn.0048fe00
mov esi, eax
test esi, esi
je 0x49144e
xor eax, eax
mov dword [0x5ed448], 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 0x491537
mov edi, eax
mov ecx, dword [edi + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx]
push eax
call fcn.0059164b
mov ebp, eax
add esp, 4
cmp ebp, 1
jb 0x49144e
cmp dword [edi + 8], 3
jne 0x491524
mov ecx, dword [edi + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
cmp byte [ecx], 0x26
jne 0x49144e
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 0x4914e0
sub eax, dword [esp + 0x2c]
cmp eax, 2
jb 0x49144e
mov eax, dword [esp + 0x34]
push eax
mov edx, ebp
call fcn.0041d5f0
mov edi, eax
test edi, edi
jne 0x49151d
mov ecx, dword [esp + 0x20]
push 8
mov edx, ebx
call fcn.00480930
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18
mov ebx, dword [edi + 0xc]
add ebx, dword [edi]
jmp 0x49153b
cmp ebp, 0x3b5
mov edi, dword [esp + 0x2c]
jbe 0x49153b
mov ebp, 0x3b5
jmp 0x49153b
mov edi, dword [esp + 0x2c]
cmp dword [esp + 0x30], 1
jne 0x491547
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.00490410
mov dword [esp + 0x14], eax
and eax, edx
cmp eax, 0xffffffff
mov dword [esp + 0x18], edx
jne 0x491585
mov dword [esi + 0x170], 1
jmp 0x491689
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 0x4915b6
mov dword [esi + 0x170], 1
jmp 0x491689
test edi, edi
je 0x4915c1
mov eax, dword [esp + 0x28]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x4915d8
mov dword [esi + 0x16c], 1
jmp 0x491689
mov ecx, dword [esp + 0x30]
mov ebp, 1
cmp ecx, ebp
jne 0x491601
movzx ecx, byte [ebx]
mov edx, dword [esp + 0x24]
push ecx
push 0x5a4998
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x491689
test edi, edi
je 0x49161b
push eax
mov eax, dword [esp + 0x28]
push 0x5a498c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x491689
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 0x491625
push 0xd
push edi
call fcn.005912e0
add esp, 8
test eax, eax
je 0x491641
mov byte [eax], 0
push 0xa
push edi
call fcn.005912e0
add esp, 8
test eax, eax
je 0x491653
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.00490410
and eax, edx
cmp eax, 0xffffffff
jne 0x491679
mov dword [esi + 0x170], ebp
jmp 0x491689
push 0
push ebp
push 0
push 2
xor edx, edx
mov ecx, esi
call fcn.00490460
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 8]
test eax, eax
jle 0x4916b9
mov edi, dword [esp + 0x10]
jmp 0x4916a0
mov edx, dword [esi + 0x40]
mov ecx, dword [edi]
call fcn.004d3ac0
mov dword [edi], eax
mov ecx, dword [esi + 8]
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 8], ecx
jg 0x4916a0
pop ebp
mov dword [esi + 8], 0
mov eax, 2
pop ebx
pop edi
pop esi
add esp, 0xc
ret 0x18