Function at 0x50c6b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push esi
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x38], 0xfffffffe
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x90], eax
cmp dword [ebp + 8], 0xfffffffe
jne 0x50c6f5
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x50d8e6
cmp dword [ebp + 8], 0
jl 0x50c70f
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x589ef4]
jae 0x50c70f
mov dword [ebp - 0x4c], 1
jmp 0x50c716
mov dword [ebp - 0x4c], 0
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x44], edx
cmp dword [ebp - 0x44], 0
jne 0x50c748
push str._fh___0___unsigned_fh____unsigned__nhandle_
push 0x567220
push 0
push 0x83
push 0x553bd0
push 2
call fcn.005022e0
add esp, 0x18
cmp eax, 1
jne 0x50c748
int3
cmp dword [ebp - 0x44], 0
jne 0x50c78a
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 9
push 0
push 0x83
push 0x553bd0
push str._read_nolock
push str._fh___0___unsigned_fh____unsigned__nhandle_
call fcn.004ff160
add esp, 0x14
or eax, 0xffffffff
jmp 0x50d8e6
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
movsx ecx, byte [eax + edx + 4]
and ecx, 1
je 0x50c7b3
mov dword [ebp - 0x80], 1
jmp 0x50c7ba
mov dword [ebp - 0x80], 0
mov edx, dword [ebp - 0x80]
mov dword [ebp - 0x54], edx
cmp dword [ebp - 0x54], 0
jne 0x50c7ec
push str.__osfile_fh___FOPEN_
push 0x567220
push 0
push 0x84
push 0x553bd0
push 2
call fcn.005022e0
add esp, 0x18
cmp eax, 1
jne 0x50c7ec
int3
cmp dword [ebp - 0x54], 0
jne 0x50c82e
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 9
push 0
push 0x84
push 0x553bd0
push str._read_nolock
push str.__osfile_fh___FOPEN_
call fcn.004ff160
add esp, 0x14
or eax, 0xffffffff
jmp 0x50d8e6
cmp dword [ebp + 0x10], 0x7fffffff
ja 0x50c840
mov dword [ebp - 0x74], 1
jmp 0x50c847
mov dword [ebp - 0x74], 0
mov ecx, dword [ebp - 0x74]
mov dword [ebp - 0x5c], ecx
cmp dword [ebp - 0x5c], 0
jne 0x50c879
push str._cnt___INT_MAX_
push 0x567220
push 0
push 0x85
push 0x553bd0
push 2
call fcn.005022e0
add esp, 0x18
cmp eax, 1
jne 0x50c879
int3
cmp dword [ebp - 0x5c], 0
jne 0x50c8bb
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 0x16
push 0
push 0x85
push 0x553bd0
push str._read_nolock
push str._cnt___INT_MAX_
call fcn.004ff160
add esp, 0x14
or eax, 0xffffffff
jmp 0x50d8e6
mov dword [ebp - 0x14], 0
cmp dword [ebp + 0x10], 0
je 0x50c8e8
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
and eax, 2
je 0x50c8ef
xor eax, eax
jmp 0x50d8e6
cmp dword [ebp + 0xc], 0
je 0x50c901
mov dword [ebp - 0x8c], 1
jmp 0x50c90b
mov dword [ebp - 0x8c], 0
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 0
jne 0x50c940
push str._inputbuf___NULL_
push 0x567220
push 0
push 0x8e
push 0x553bd0
push 2
call fcn.005022e0
add esp, 0x18
cmp eax, 1
jne 0x50c940
int3
cmp dword [ebp - 0x64], 0
jne 0x50c982
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 0x16
push 0
push 0x8e
push 0x553bd0
push str._read_nolock
push str._inputbuf___NULL_
call fcn.004ff160
add esp, 0x14
or eax, 0xffffffff
jmp 0x50d8e6
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
mov al, byte [edx + ecx + 0x24]
shl al, 1
sar al, 1
mov byte [ebp - 0xd], al
mov cl, byte [ebp - 0xd]
mov byte [ebp - 0x7c], cl
cmp byte [ebp - 0x7c], 1
je 0x50c9be
cmp byte [ebp - 0x7c], 2
je 0x50cadf
jmp 0x50cb74
mov edx, dword [ebp + 0x10]
and edx, 1
jne 0x50c9cf
mov dword [ebp - 0x6c], 1
jmp 0x50c9d6
mov dword [ebp - 0x6c], 0
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x50ca08
push str.__cnt__1___0_
push 0x567220
push 0
push 0xaa
push 0x553bd0
push 2
call fcn.005022e0
add esp, 0x18
cmp eax, 1
jne 0x50ca08
int3
cmp dword [ebp - 0x48], 0
jne 0x50ca4a
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 0x16
push 0
push 0xaa
push 0x553bd0
push str._read_nolock
push str.__cnt__1___0_
call fcn.004ff160
add esp, 0x14
or eax, 0xffffffff
jmp 0x50d8e6
mov edx, dword [ebp + 0x10]
shr edx, 1
cmp edx, 4
jae 0x50ca5d
mov dword [ebp - 0x50], 4
jmp 0x50ca65
mov eax, dword [ebp + 0x10]
shr eax, 1
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
mov dword [ebp + 0x10], ecx
push 0xae
push str.f:dd_vctoolscrt_bld_self_x86crt_src_read.c
push 2
mov edx, dword [ebp + 0x10]
push edx
call fcn.00500b70
add esp, 0x10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x50caaa
call fcn.00502d90
mov dword [eax], 0xc
call fcn.00502d30
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x50d8e6
push 1
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00509d70
add esp, 0x10
mov ecx, dword [ebp + 8]
sar ecx, 5
mov esi, dword [ebp + 8]
and esi, 0x1f
shl esi, 6
mov ecx, dword [ecx*4 + 0x587790]
mov dword [ecx + esi + 0x28], eax
mov dword [ecx + esi + 0x2c], edx
jmp 0x50cb7a
mov edx, dword [ebp + 0x10]
and edx, 1
jne 0x50caf0
mov dword [ebp - 0x58], 1
jmp 0x50caf7
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x50cb29
push str.__cnt__1___0_
push 0x567220
push 0
push 0xba
push 0x553bd0
push 2
call fcn.005022e0
add esp, 0x18
cmp eax, 1
jne 0x50cb29
int3
cmp dword [ebp - 0x60], 0
jne 0x50cb6b
call fcn.00502d30
mov dword [eax], 0
call fcn.00502d90
mov dword [eax], 0x16
push 0
push 0xba
push 0x553bd0
push str._read_nolock
push str.__cnt__1___0_
call fcn.004ff160
add esp, 0x14
or eax, 0xffffffff
jmp 0x50d8e6
mov edx, dword [ebp + 0x10]
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
movsx edx, byte [ecx + eax + 4]
and edx, 0x48
je 0x50cd72
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 5]
cmp eax, 0xa
je 0x50cd72
cmp dword [ebp + 0x10], 0
je 0x50cd72
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
mov ecx, dword [ebp - 0x2c]
mov dl, byte [eax + edx + 5]
mov byte [ecx], dl
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 0x10]
sub edx, 1
mov dword [ebp + 0x10], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
mov byte [edx + ecx + 5], 0xa
movsx eax, byte [ebp - 0xd]
test eax, eax
je 0x50cd72
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
add eax, edx
mov ecx, 1
imul ecx, ecx, 0
movsx edx, byte [eax + ecx + 0x25]
cmp edx, 0xa
je 0x50cd72
cmp dword [ebp + 0x10], 0
je 0x50cd72
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
add ecx, dword [eax*4 + 0x587790]
mov edx, 1
imul edx, edx, 0
mov eax, dword [ebp - 0x2c]
mov cl, byte [ecx + edx + 0x25]
mov byte [eax], cl
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 1
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
add eax, dword [edx*4 + 0x587790]
mov ecx, 1
imul ecx, ecx, 0
mov byte [eax + ecx + 0x25], 0xa
movsx edx, byte [ebp - 0xd]
cmp edx, 1
jne 0x50cd72
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
add edx, ecx
mov eax, 1
shl eax, 0
movsx ecx, byte [edx + eax + 0x25]
cmp ecx, 0xa
je 0x50cd72
cmp dword [ebp + 0x10], 0
je 0x50cd72
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
add eax, dword [edx*4 + 0x587790]
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0x2c]
mov al, byte [eax + ecx + 0x25]
mov byte [edx], al
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0x10]
sub eax, 1
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
add edx, dword [ecx*4 + 0x587790]
mov eax, 1
shl eax, 0
mov byte [edx + eax + 0x25], 0xa
mov ecx, dword [ebp + 8]
push ecx
call fcn.00528fc0
add esp, 4
test eax, eax
je 0x50cdcf
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
movsx edx, byte [ecx + eax + 4]
and edx, 0x80
je 0x50cdcf
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x50ce40
movsx edx, byte [ebp - 0xd]
cmp edx, 2
jne 0x50ce40
push 0
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x10]
shr ecx, 1
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
jne 0x50ce33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00502d60
add esp, 4
mov dword [ebp - 0x38], 0xffffffff
jmp 0x50d8bb
mov edx, dword [ebp - 0x24]
shl edx, 1
mov dword [ebp - 0x24], edx
jmp 0x50cede
push 0
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50ce80
cmp dword [ebp - 0x24], 0
jl 0x50ce80
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp + 0x10]
jbe 0x50cede
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 5
jne 0x50ceb2
call fcn.00502d90
mov dword [eax], 9
call fcn.00502d30
mov edx, dword [ebp - 0x28]
mov dword [eax], edx
mov dword [ebp - 0x38], 0xffffffff
jmp 0x50d8bb
cmp dword [ebp - 0x28], 0x6d
jne 0x50cec6
mov dword [ebp - 0x38], 0
jmp 0x50d8bb
mov eax, dword [ebp - 0x28]
push eax
call fcn.00502d60
add esp, 4
mov dword [ebp - 0x38], 0xffffffff
jmp 0x50d8bb
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
movsx edx, byte [ecx + eax + 4]
and edx, 0x80
je 0x50d8bb
movsx eax, byte [ebp - 0xd]
cmp eax, 2
je 0x50d436
cmp dword [ebp - 0x24], 0
je 0x50cf66
mov ecx, dword [ebp - 0x18]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x50cf66
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
or eax, 4
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov ecx, dword [ecx*4 + 0x587790]
mov byte [ecx + edx + 4], al
jmp 0x50cf9e
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
movsx edx, byte [ecx + eax + 4]
and edx, 0xfffffffb
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov eax, dword [eax*4 + 0x587790]
mov byte [eax + ecx + 4], dl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
cmp dword [ebp - 0x20], eax
jae 0x50d1f8
mov ecx, dword [ebp - 0x20]
movsx edx, byte [ecx]
cmp edx, 0x1a
jne 0x50d048
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
and eax, 0x40
jne 0x50d022
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
movsx ecx, byte [eax + edx + 4]
or ecx, 2
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov edx, dword [edx*4 + 0x587790]
mov byte [edx + eax + 4], cl
jmp 0x50d03e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
jmp 0x50d1f8
mov edx, dword [ebp - 0x20]
movsx eax, byte [edx]
cmp eax, 0xd
je 0x50d074
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov al, byte [edx]
mov byte [ecx], al
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
jmp 0x50d1f3
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax - 1]
cmp dword [ebp - 0x20], edx
jae 0x50d0ca
mov eax, dword [ebp - 0x20]
movsx ecx, byte [eax + 1]
cmp ecx, 0xa
jne 0x50d0a9
mov edx, dword [ebp - 0x20]
add edx, 2
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 4]
mov byte [eax], 0xa
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
jmp 0x50d0c5
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x50d1f3
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x28], 0
push 0
lea edx, [ebp - 0x24]
push edx
push 1
lea eax, [ebp - 0x19]
push eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x50d113
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x50d11f
cmp dword [ebp - 0x24], 0
jne 0x50d133
mov edx, dword [ebp - 4]
mov byte [edx], 0xd
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x50d1f3
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
movsx ecx, byte [eax + edx + 4]
and ecx, 0x48
je 0x50d19b
movsx edx, byte [ebp - 0x19]
cmp edx, 0xa
jne 0x50d16d
mov eax, dword [ebp - 4]
mov byte [eax], 0xa
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
jmp 0x50d199
mov edx, dword [ebp - 4]
mov byte [edx], 0xd
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
mov cl, byte [ebp - 0x19]
mov byte [eax + edx + 5], cl
jmp 0x50d1f3
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x18]
jne 0x50d1bd
movsx eax, byte [ebp - 0x19]
cmp eax, 0xa
jne 0x50d1bd
mov ecx, dword [ebp - 4]
mov byte [ecx], 0xa
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
jmp 0x50d1f3
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
mov eax, dword [ebp + 8]
push eax
call fcn.00509d70
add esp, 0x10
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
movsx ecx, byte [ebp - 0x19]
cmp ecx, 0xa
je 0x50d1f3
mov edx, dword [ebp - 4]
mov byte [edx], 0xd
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x50cfaa
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
movsx edx, byte [ebp - 0xd]
cmp edx, 1
jne 0x50d431
cmp dword [ebp - 0x14], 0
je 0x50d431
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
and edx, 0x80
jne 0x50d23d
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x50d3a2
mov dword [ebp - 0x30], 1
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx]
movsx eax, byte [edx + 0x584018]
test eax, eax
jne 0x50d277
cmp dword [ebp - 0x30], 4
jg 0x50d277
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x18]
jb 0x50d277
mov edx, dword [ebp - 4]
sub edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
jmp 0x50d244
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx]
movsx eax, byte [edx + 0x584018]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
jne 0x50d2a4
call fcn.00502d90
mov dword [eax], 0x2a
mov dword [ebp - 0x38], 0xffffffff
jmp 0x50d8bb
mov ecx, dword [ebp - 0x68]
add ecx, 1
cmp ecx, dword [ebp - 0x30]
jne 0x50d2bd
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x30]
mov dword [ebp - 4], edx
jmp 0x50d3a2
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
and eax, 0x48
je 0x50d380
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
mov ecx, dword [ebp - 4]
mov cl, byte [ecx]
mov byte [eax + edx + 5], cl
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
cmp dword [ebp - 0x30], 2
jl 0x50d33f
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
add ecx, dword [eax*4 + 0x587790]
mov edx, 1
imul edx, edx, 0
mov eax, dword [ebp - 4]
mov al, byte [eax]
mov byte [ecx + edx + 0x25], al
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 0x30], 3
jne 0x50d375
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
add eax, dword [edx*4 + 0x587790]
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 4]
mov dl, byte [edx]
mov byte [eax + ecx + 0x25], dl
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0x30]
mov dword [ebp - 4], ecx
jmp 0x50d3a2
push 1
mov eax, dword [ebp - 0x30]
neg eax
cdq
push edx
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00509d70
add esp, 0x10
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x90]
shr ecx, 1
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x50d3f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00502d60
add esp, 4
mov dword [ebp - 0x38], 0xffffffff
jmp 0x50d8bb
mov edx, dword [ebp - 4]
sub edx, dword [ebp - 0x18]
cmp dword [ebp - 0x14], edx
je 0x50d405
mov dword [ebp - 0x70], 1
jmp 0x50d40c
mov dword [ebp - 0x70], 0
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
mov eax, dword [ebp - 0x70]
mov dword [edx + ecx + 0x30], eax
mov ecx, dword [ebp - 0x14]
shl ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0x50d8bb
cmp dword [ebp - 0x40], 0
je 0x50d54f
mov edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax*2]
cmp dword [ebp - 0xc], edx
jae 0x50d53d
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
cmp ecx, 0x1a
jne 0x50d4b0
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
movsx edx, byte [ecx + eax + 4]
or edx, 2
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov eax, dword [eax*4 + 0x587790]
mov byte [eax + ecx + 4], dl
jmp 0x50d53d
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx]
cmp edx, 0xd
je 0x50d4db
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov dx, word [ecx]
mov word [eax], dx
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 2
mov dword [ebp - 0xc], ecx
jmp 0x50d538
mov eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x18]
lea eax, [edx + eax*2 - 2]
cmp dword [ebp - 0xc], eax
jae 0x50d538
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + 2]
cmp edx, 0xa
jne 0x50d51a
mov eax, dword [ebp - 0xc]
add eax, 2
mov dword [ebp - 0xc], eax
mov ecx, 0xa
mov edx, dword [ebp - 8]
mov word [edx], cx
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
jmp 0x50d538
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov ax, word [edx]
mov word [ecx], ax
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
add edx, 2
mov dword [ebp - 0xc], edx
jmp 0x50d44c
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x18]
sar eax, 1
shl eax, 1
mov dword [ebp - 0x14], eax
jmp 0x50d8bb
cmp dword [ebp - 0x24], 0
je 0x50d59a
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
cmp edx, 0xa
jne 0x50d59a
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
or eax, 4
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov ecx, dword [ecx*4 + 0x587790]
mov byte [ecx + edx + 4], al
jmp 0x50d5d2
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
movsx edx, byte [ecx + eax + 4]
and edx, 0xfffffffb
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov eax, dword [eax*4 + 0x587790]
mov byte [eax + ecx + 4], dl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
cmp dword [ebp - 0xc], eax
jae 0x50d8b2
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx]
cmp edx, 0x1a
jne 0x50d67e
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
and eax, 0x40
jne 0x50d656
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x587790]
movsx ecx, byte [eax + edx + 4]
or ecx, 2
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov edx, dword [edx*4 + 0x587790]
mov byte [edx + eax + 4], cl
jmp 0x50d674
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov dx, word [ecx]
mov word [eax], dx
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 2
mov dword [ebp - 0xc], ecx
jmp 0x50d8b2
mov edx, dword [ebp - 0xc]
movzx eax, word [edx]
cmp eax, 0xd
je 0x50d6ac
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov ax, word [edx]
mov word [ecx], ax
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
add edx, 2
mov dword [ebp - 0xc], edx
jmp 0x50d8ad
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax - 2]
cmp dword [ebp - 0xc], edx
jae 0x50d709
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax + 2]
cmp ecx, 0xa
jne 0x50d6e6
mov edx, dword [ebp - 0xc]
add edx, 4
mov dword [ebp - 0xc], edx
mov eax, 0xa
mov ecx, dword [ebp - 8]
mov word [ecx], ax
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
jmp 0x50d704
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov dx, word [ecx]
mov word [eax], dx
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 2
mov dword [ebp - 0xc], ecx
jmp 0x50d8ad
mov edx, dword [ebp - 0xc]
add edx, 2
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x28], 0
push 0
lea eax, [ebp - 0x24]
push eax
push 2
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x587790]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x50d752
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x50d75e
cmp dword [ebp - 0x24], 0
jne 0x50d777
mov eax, 0xd
mov ecx, dword [ebp - 8]
mov word [ecx], ax
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
jmp 0x50d8ad
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
movsx eax, byte [edx + ecx + 4]
and eax, 0x48
je 0x50d84b
movzx ecx, word [ebp - 0x34]
cmp ecx, 0xa
jne 0x50d7bd
mov edx, 0xa
mov eax, dword [ebp - 8]
mov word [eax], dx
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 8], ecx
jmp 0x50d849
lea edx, [ebp - 0x34]
mov dword [ebp - 0x3c], edx
mov eax, 0xd
mov ecx, dword [ebp - 8]
mov word [ecx], ax
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x587790]
mov eax, dword [ebp - 0x3c]
mov al, byte [eax]
mov byte [edx + ecx + 5], al
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
add eax, dword [edx*4 + 0x587790]
mov ecx, 1
imul ecx, ecx, 0
mov edx, dword [ebp - 0x3c]
mov dl, byte [edx]
mov byte [eax + ecx + 0x25], dl
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
add ecx, dword [eax*4 + 0x587790]
mov edx, 1
shl edx, 0
mov byte [ecx + edx + 0x25], 0xa
jmp 0x50d8ad
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
jne 0x50d872
movzx ecx, word [ebp - 0x34]
cmp ecx, 0xa
jne 0x50d872
mov edx, 0xa
mov eax, dword [ebp - 8]
mov word [eax], dx
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 8], ecx
jmp 0x50d8ad
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
mov edx, dword [ebp + 8]
push edx
call fcn.00509d70
add esp, 0x10
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
movzx eax, word [ebp - 0x34]
cmp eax, 0xa
je 0x50d8ad
mov ecx, 0xd
mov edx, dword [ebp - 8]
mov word [edx], cx
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
jmp 0x50d5de
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp + 0xc]
je 0x50d8cf
mov eax, dword [ebp - 0x18]
push eax
call fcn.004fd170
add esp, 4
cmp dword [ebp - 0x38], 0xfffffffe
jne 0x50d8dd
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x78], ecx
jmp 0x50d8e3
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x78]
pop esi
mov esp, ebp
pop ebp
ret