Function at 0x49bf60
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 8]
test ecx, ecx
push edi
jne 0x49bfc0
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
push 0x63
push edi
push eax
mov eax, dword [esp + 0x24]
push esi
push edx
push eax
call fcn.00515c10
add esp, 0x18
cmp eax, 1
jne 0x49c3ac
mov ecx, dword [esi + 8]
cmp ecx, eax
je 0x49c3ac
cmp ecx, 3
je 0x49c3ac
push 6
push edi
push esi
call fcn.0048abf0
add esp, 0xc
pop edi
pop esi
add esp, 0xc
ret
mov eax, dword [esi + 0x40]
test eax, eax
je 0x49bfe2
cmp ecx, 2
jl 0x49bfd3
mov edx, dword [eax + 0x40]
test edx, edx
je 0x49bfe2
cmp ecx, 3
jne 0x49bfed
mov edx, dword [eax + 0x40]
mov esi, dword [edx + 0x40]
test esi, esi
jne 0x49bfed
pop edi
mov eax, 2
pop esi
add esp, 0xc
ret
mov esi, dword [eax + 0x1c]
mov edx, 1
cmp esi, edx
jne 0x49c016
cmp ecx, 2
jl 0x49c006
mov esi, dword [eax + 0x40]
cmp dword [esi + 0x1c], edx
jne 0x49c016
cmp ecx, 3
jne 0x49c01e
mov esi, dword [eax + 0x40]
mov esi, dword [esi + 0x40]
cmp dword [esi + 0x1c], edx
je 0x49c01e
pop edi
mov eax, edx
pop esi
add esp, 0xc
ret
mov edx, dword [eax + 0xc]
test edx, edx
push ebx
push ebp
jne 0x49c36a
cmp ecx, 2
jl 0x49c03e
mov edx, dword [eax + 0x40]
mov esi, dword [edx + 0xc]
test esi, esi
jne 0x49c36a
cmp ecx, 3
jne 0x49c054
mov edx, dword [eax + 0x40]
mov edx, dword [edx + 0x40]
mov esi, dword [edx + 0xc]
test esi, esi
jne 0x49c36a
cmp dword [esp + 0x38], 1
jne 0x49c07c
cmp ecx, 1
je 0x49c07c
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
push 6
push eax
push ecx
call fcn.0048abf0
add esp, 0xc
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret
mov edx, dword [eax]
push edx
call fcn.00515900
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x38]
add esp, 4
test eax, eax
mov eax, dword [edi + 0x40]
mov ecx, dword [eax]
je 0x49c103
push ecx
call fcn.005cbe51
add esp, 4
test eax, eax
jne 0x49c0d4
mov eax, dword [0x637094]
xor ecx, ecx
test eax, eax
je 0x49c0bb
mov eax, dword [eax + 0x174]
inc ecx
test eax, eax
jne 0x49c0b0
mov edx, dword [esp + 0x2c]
push ecx
push 0x5e6a4c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x49c36a
mov esi, dword [0x637094]
test esi, esi
je 0x49c122
mov edi, edi
dec eax
test eax, eax
jle 0x49c141
mov esi, dword [esi + 0x174]
test esi, esi
jne 0x49c0e0
push 6
push ebx
push edi
call fcn.0048abf0
add esp, 0xc
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret
mov edx, ebx
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x49c105
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49c114
sub eax, edx
cmp eax, 0x5a
jbe 0x49c136
push 6
push ebx
push edi
call fcn.0048abf0
add esp, 0xc
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret
push ebx
call fcn.0049aa40
add esp, 4
mov esi, eax
test esi, esi
je 0x49c122
xor eax, eax
mov dword [0x637098], esi
mov ecx, 0xf9
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x28]
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ecx + 8], 2
mov dword [esp + 0x10], 0
mov ebp, 0x3b5
jl 0x49c20c
mov edi, ecx
mov edx, dword [edi + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
push ecx
call fcn.005cbe51
mov ebp, eax
add esp, 4
cmp ebp, 1
jb 0x49c122
cmp dword [edi + 8], 3
jne 0x49c1f9
mov edx, dword [edi + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx]
cmp byte [edx], 0x26
jne 0x49c122
mov eax, edx
lea ecx, [eax + 1]
mov dword [esp + 0x10], ecx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49c1b1
sub eax, dword [esp + 0x10]
cmp eax, 2
jb 0x49c122
mov eax, dword [esp + 0x3c]
push eax
push ebp
push edx
call fcn.0041ff40
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49c1f2
mov ecx, dword [esp + 0x28]
push 8
push ebx
push ecx
call fcn.0048abf0
add esp, 0xc
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc
ret
mov ebx, dword [edi + 0xc]
add ebx, dword [edi]
jmp 0x49c210
cmp ebp, 0x3b5
mov edi, dword [esp + 0x10]
jbe 0x49c210
mov ebp, 0x3b5
jmp 0x49c210
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x38], 1
jne 0x49c21c
mov ebp, 1
mov edx, dword [esi + 0x168]
xor eax, eax
push 1
push eax
push eax
push edx
mov dword [esi + 0x170], eax
mov dword [esi + 0x16c], eax
call fcn.0049b080
mov dword [esp + 0x20], eax
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
mov dword [esp + 0x14], edx
jne 0x49c25b
mov dword [esi + 0x170], 1
jmp 0x49c36a
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
mov dword [esp + 0x24], 0
mov ecx, dword [esi + 0x168]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x49c28c
mov dword [esi + 0x170], 1
jmp 0x49c36a
test edi, edi
je 0x49c297
mov edx, dword [esp + 0x18]
mov dword [edi + 8], edx
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x49c2ae
mov dword [esi + 0x16c], 1
jmp 0x49c36a
mov ecx, dword [esp + 0x38]
mov ebp, 1
cmp ecx, ebp
jne 0x49c2d7
movzx eax, byte [ebx]
mov ecx, dword [esp + 0x2c]
push eax
push 0x5e6a4c
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x49c36a
test edi, edi
je 0x49c2f4
mov edx, dword [esp + 0x2c]
push eax
push 0x5e6a40
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x49c36a
mov edi, dword [esp + 0x2c]
mov edx, edi
mov eax, ebx
sub edx, ebx
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x49c300
push 0xd
push edi
call fcn.005cbf10
add esp, 8
test eax, eax
je 0x49c31c
mov byte [eax], 0
push 0xa
push edi
call fcn.005cbf10
add esp, 8
test eax, eax
je 0x49c32e
mov byte [eax], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x168]
push 0
push eax
push ecx
push edx
call fcn.0049b080
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x49c358
mov dword [esi + 0x170], ebp
jmp 0x49c36a
push 0
push ebp
push 0
push 0
push 2
push esi
call fcn.0049b0e0
add esp, 0x18
mov esi, dword [esp + 0x28]
mov eax, dword [esi + 8]
test eax, eax
jle 0x49c39e
mov edi, dword [esp + 0x24]
lea esp, [esp]
mov eax, dword [esi + 0x40]
mov ecx, dword [edi]
push eax
push ecx
call fcn.004e3140
mov dword [edi], eax
mov ecx, dword [esi + 8]
add esp, 8
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 8], ecx
jg 0x49c380
pop ebp
mov dword [esi + 8], 0
mov eax, 2
pop ebx
pop edi
pop esi
add esp, 0xc
ret