Function at 0x4ad0e7e0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
push edi
xor esi, esi
inc esi
push 0x4ad07218
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x40], 0x3b
call fcn.4ad04c13
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4c]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x1c], ebx
cmp eax, ebx
je 0x4ad0ea3d
mov ecx, eax
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
cmp ax, 0x22
jne 0x4ad14870
movzx eax, ax
inc ecx
inc ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], ecx
cmp ecx, ebx
je 0x4ad0ea3d
mov ebx, dword [sym.imp.msvcrt.dll__wcsnicmp]
movzx eax, word [ecx]
test ax, ax
je 0x4ad0e997
cmp ax, 0x20
jbe 0x4ad0ff20
mov esi, dword [ebp - 0x2c]
cmp word [ecx], si
je 0x4ad0e997
push 8
push 0x4ad0edc8
push ecx
call ebx
add esp, 0xc
test eax, eax
je 0x4ad14882
push 7
push 0x4ad0edb8
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad14892
push 4
push 0x4ad0edac
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad148a2
push 7
push 0x4ad0ed9c
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad0f06e
push 5
push 0x4ad0ed90
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad0ff4b
push 7
push 0x4ad0ed80
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
jne 0x4ad148b5
add dword [ebp - 4], 0xe
mov eax, dword [ebp - 4]
movzx eax, word [eax]
xor edi, edi
mov dword [ebp - 0x28], edi
cmp ax, di
je 0x4ad0e984
cmp ax, word [ebp - 0x2c]
je 0x4ad0e984
cmp ax, 0x2a
je 0x4ad0fabf
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_wcstol]
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4ad148b5
mov eax, dword [ebp - 4]
cmp word [eax], 0x2d
je 0x4ad0fa9f
mov eax, esi
cmp eax, 0x20
jge 0x4ad0e965
cmp esi, eax
jg 0x4ad0e965
sub eax, esi
inc eax
lea ecx, [esi - 1]
add edi, eax
xor edx, edx
inc edx
shl edx, cl
or dword [ebp - 0x28], edx
inc ecx
dec eax
jne 0x4ad0e959
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x2c
jne 0x4ad0f05f
add dword [ebp - 4], 2
mov eax, dword [ebp - 4]
movzx eax, word [eax]
test ax, ax
jne 0x4ad0e90d
cmp edi, dword [ebp - 0xc]
jle 0x4ad0e98c
mov dword [ebp - 0xc], edi
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4ad0e84f
cmp dword [ebp - 0xc], 1
jle 0x4ad0ea3b
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0xc]
lea esi, [edi + eax]
lea eax, [esi + esi + 2]
push eax
push dword [0x4ad240bc]
call fcn.4ad02a13
mov dword [0x4ad240bc], eax
lea eax, [esi*4 + 4]
push eax
push dword [0x4ad240c0]
call fcn.4ad02a13
cmp dword [0x4ad240bc], 0
mov dword [0x4ad240c0], eax
je 0x4ad148cf
test eax, eax
je 0x4ad148cf
xor edx, edx
inc edx
cmp edi, edx
jle 0x4ad0ea2a
mov eax, dword [ebp + 0xc]
lea ecx, [eax*4 + 4]
lea eax, [eax + eax + 2]
mov esi, dword [ebp + 8]
mov si, word [esi + 0x44]
mov edi, dword [0x4ad240bc]
add si, dx
mov word [edi + eax], si
mov esi, dword [0x4ad240c0]
and dword [esi + ecx], 0
inc edx
inc eax
inc eax
add ecx, 4
cmp edx, dword [ebp - 0xc]
jl 0x4ad0ea01
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x4ad240bc]
add edx, eax
xor eax, eax
mov word [ecx + edx*2], ax
xor ebx, ebx
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x3c]
mov dword [ebp - 8], edi
cmp dword [ebp - 0x1c], ebx
jne 0x4ad148e7
mov dword [ebp - 0x30], 0x27
mov dword [ebp - 0x34], 0x22
cmp edi, ebx
je 0x4ad0ea70
movzx eax, word [edi]
cmp ax, word [ebp - 0x30]
je 0x4ad0ea7d
cmp ax, word [ebp - 0x34]
je 0x4ad0ea7d
push ebx
push ebx
push edi
call fcn.4ad027a7
mov edi, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], ebx
cmp word [edi], bx
je 0x4ad0ed4b
cmp byte [0x4ad240b8], 0
jne 0x4ad0ed4b
call fcn.4ad0e373
call fcn.4ad06509
mov eax, dword [ebp - 0x50]
and dword [ebp - 4], 0
and dword [ebp - 0x18], 0
mov dword [ebp - 0x14], eax
mov eax, edi
push 2
lea ecx, [eax + 2]
pop esi
mov dx, word [eax]
add eax, esi
test dx, dx
jne 0x4ad0eabc
mov edx, dword [ebp - 0x30]
sub eax, ecx
sar eax, 1
mov ecx, eax
movzx eax, word [edi]
mov dword [ebp - 0x1c], ecx
cmp ax, dx
je 0x4ad0fcd5
mov edx, dword [ebp - 0x34]
cmp ax, dx
je 0x4ad0facc
cmp ax, 0x22
je 0x4ad148fa
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 5
push 0x80000000
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4ad1028e
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esi + esi + 4]
push eax
call fcn.4ad018b8
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x4ad14963
or dword [ebp - 0x20], 0xffffffff
push ebx
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x18]
push esi
add eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov dword [ebp - 0x3c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3c], ebx
je 0x4ad14937
cmp dword [ebp - 0x20], esi
jne 0x4ad0ff36
mov edi, dword [ebp - 0x18]
push esi
push edi
push esi
add esi, edi
push esi
mov esi, dword [0x4ad241b0]
push esi
call fcn.4ad0651c
neg eax
sbb eax, eax
neg eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [edi + eax*2]
mov dword [ebp - 4], edi
mov dword [ebp - 0x2c], eax
cmp eax, edi
je 0x4ad0f113
cmp word [eax - 2], 0xa
jne 0x4ad0f113
mov edi, dword [ebp - 8]
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 4], eax
jae 0x4ad0ed29
cmp byte [0x4ad240b8], 0
jne 0x4ad0ed29
call fcn.4ad06509
mov esi, dword [ebp - 4]
push 0xa
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x4ad0ed29
cmp eax, esi
jbe 0x4ad0ec07
cmp word [eax - 2], 0xd
jne 0x4ad0ec07
xor ecx, ecx
mov word [eax - 2], cx
mov eax, dword [ebp - 4]
xor ecx, ecx
mov word [eax], cx
add dword [ebp - 4], 2
xor edx, edx
cmp dword [ebp - 0x14], edx
jne 0x4ad0ff70
mov ecx, dword [ebp - 0xc]
cmp ecx, 1
jle 0x4ad0ec3d
mov eax, dword [ebp + 0xc]
lea eax, [eax*4 + 4]
dec ecx
mov ebx, dword [0x4ad240c0]
mov dword [eax + ebx], edx
add eax, 4
dec ecx
jne 0x4ad0ec2e
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], edx
cmp word [esi], dx
je 0x4ad0ed1d
mov eax, dword [ebp + 0xc]
shl eax, 2
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], eax
xor ebx, ebx
cmp word [esi], bx
je 0x4ad0ec7a
movzx eax, word [esi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x4ad0f0ee
cmp dword [ebp - 8], ebx
je 0x4ad0edda
mov eax, dword [ebp - 0x44]
mov ebx, esi
test eax, eax
jne 0x4ad10663
cmp word [esi], 0
je 0x4ad0ecf7
movzx eax, word [esi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x4ad0ecb0
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad0ec96
cmp ebx, esi
je 0x4ad0ece1
cmp dword [ebp - 8], 0x20
jge 0x4ad0ece1
mov ecx, dword [ebp - 8]
xor eax, eax
inc eax
shl eax, cl
and eax, dword [ebp - 0x28]
inc dword [ebp - 8]
test eax, eax
je 0x4ad0ece1
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x4ad240c0]
inc dword [ebp - 0x10]
add dword [ebp - 0x38], 4
inc dword [ebp - 0x3c]
mov dword [eax + ecx], ebx
cmp word [esi], 0
je 0x4ad0ecf7
xor eax, eax
mov word [esi], ax
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad0ec5c
cmp dword [ebp - 0x10], 0
je 0x4ad0ed1d
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x40]
call fcn.4ad0df45
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
call fcn.4ad0df7e
and dword [ebp + 0x10], 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x2c]
jb 0x4ad0ebc8
cmp dword [ebp - 0x18], 0
je 0x4ad0ed37
push dword [ebp - 0x18]
call fcn.4ad013cf
mov eax, dword [ebp - 0x1c]
lea edi, [edi + eax*2 + 2]
cmp word [edi], 0
mov dword [ebp - 8], edi
jne 0x4ad0ea8f
cmp dword [ebp - 0xc], 1
jle 0x4ad0ed73
mov eax, dword [0x4ad240bc]
test eax, eax
je 0x4ad0ed73
cmp word [eax], 0
je 0x4ad0ed73
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov word [eax + ecx*2 + 2], dx
mov eax, dword [0x4ad240c0]
and dword [eax + ecx*4 + 4], edx
mov eax, dword [ebp - 0x4c]
pop edi
pop esi
pop ebx
leave
ret 0xc
mov ax, word [ebp - 0x40]
cmp word [esi], ax
jne 0x4ad0ec83
jmp 0x4ad0ecf7
cmp ax, 0x2a
jne 0x4ad0e984
jmp 0x4ad0e979
mov eax, dword [ebp - 4]
add eax, 0xe
mov edi, eax
jmp 0x4ad0f085
cmp cx, si
je 0x4ad0f090
cmp cx, 0x20
je 0x4ad0f0c5
inc eax
inc eax
mov dword [ebp - 4], eax
movzx ecx, word [eax]
test cx, cx
jne 0x4ad0f078
movzx esi, word [eax]
push dword [ebp - 0x24]
xor ecx, ecx
mov word [eax], cx
call fcn.4ad013cf
push edi
call fcn.4ad04c13
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov word [eax], si
mov eax, dword [ebp - 4]
cmp word [eax], 0
je 0x4ad0e98c
add dword [ebp - 4], 2
jmp 0x4ad0e98c
cmp word [eax + 2], si
jne 0x4ad0f090
jmp 0x4ad0f083
inc esi
inc esi
jmp 0x4ad0ec5e
push 0xa
pop ecx
mov word [eax], cx
inc eax
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x4ad0ebb4
push 0
lea ecx, [ebp - 4]
push ecx
add eax, 2
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
test eax, eax
jg 0x4ad0e948
jmp 0x4ad148b5
add dword [ebp - 4], 2
inc edi
mov dword [ebp - 0x44], edi
jmp 0x4ad0e984
cmp ecx, 1
jle 0x4ad0eaea
cmp word [edi + ecx*2 - 2], dx
jne 0x4ad0eaea
push 0xa
pop eax
mov word [edi + ecx*2 - 2], ax
add edi, esi
sub ecx, esi
lea eax, [edi + ecx*2 + 2]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 0x2c], eax
jmp 0x4ad0ebbc
mov al, byte [esi]
inc esi
test al, al
jne 0x4ad0fc15
sub esi, ecx
push ebx
call dword [sym.imp.msvcrt.dll_feof]
pop ecx
test eax, eax
jne 0x4ad0fc7a
push ebx
call dword [sym.imp.msvcrt.dll_ferror]
pop ecx
test eax, eax
jne 0x4ad0fc7a
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, 0x200
jae 0x4ad0fc5f
add dword [ebp - 0x10], 0x100
push dword [ebp - 0x10]
test edi, edi
jne 0x4ad0fcc3
call fcn.4ad018b8
mov edi, eax
test edi, edi
je 0x4ad1493f
mov ecx, dword [ebp - 0x10]
push ebx
sub ecx, esi
lea eax, [edi + esi]
push ecx
push eax
mov byte [eax], 0
call dword [sym.imp.msvcrt.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x4ad0fccb
push ebx
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
lea eax, [esi + esi + 4]
push eax
push edi
call fcn.4ad02a13
cmp dword [0x4ad240bc], 0
mov edi, eax
je 0x4ad1494f
cmp dword [0x4ad240c0], 0
je 0x4ad1494f
push esi
lea eax, [edi + esi]
push edi
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], esi
jmp 0x4ad0eb75
push edi
call fcn.4ad02a13
jmp 0x4ad0fc55
mov esi, edi
lea ecx, [esi + 1]
jmp 0x4ad0fc15
cmp ecx, 1
jle 0x4ad0eade
cmp word [edi + ecx*2 - 2], dx
jne 0x4ad0eade
sub dword [ebp - 0x1c], 2
mov ecx, dword [ebp - 0x1c]
inc edi
inc edi
xor eax, eax
push 0x4ad0fd20
push edi
mov dword [ebp - 8], edi
mov word [edi + ecx*2], ax
call dword [sym.imp.msvcrt.dll__wpopen]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x4ad0ff3e
xor edi, edi
mov dword [ebp - 0x10], edi
xor esi, esi
jmp 0x4ad0fc1e
inc ecx
inc ecx
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
jne 0x4ad0e85b
jmp 0x4ad0e865
mov edi, dword [ebp - 8]
jmp 0x4ad0ed29
push edi
push 1
push 0x2331
jmp 0x4ad10298
add dword [ebp - 4], 0xa
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
mov dword [ebp - 0x14], eax
test eax, eax
jg 0x4ad0e98c
jmp 0x4ad148b5
dec dword [ebp - 0x14]
jmp 0x4ad0ed1d
push dword [ebp - 8]
push 1
push 0x2363
call fcn.4ad0ab8b
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad0ed76
cmp dword [ebp - 0x3c], eax
jne 0x4ad0ec90
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [0x4ad240c0]
inc dword [ebp - 0x10]
mov dword [eax + ecx*4], esi
jmp 0x4ad0ecf7
cmp ax, 0x27
je 0x4ad0e836
mov dword [ebp - 0x2c], ebx
jmp 0x4ad0e841
add dword [ebp - 4], 0x10
mov dword [ebp - 0x1c], 1
jmp 0x4ad0e98c
add dword [ebp - 4], 0xe
mov dword [ebp - 0x1c], 1
jmp 0x4ad0e98c
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
add dword [ebp - 4], 0xa
mov dword [ebp - 0x40], eax
jmp 0x4ad0e98c
push dword [ebp - 4]
push 1
push 0x234a
call fcn.4ad0ab8b
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4ad0ed76
push 0
push 0x2374
call fcn.4ad0ab8b
pop ecx
pop ecx
call fcn.4ad1fa8e
jmp 0x4ad0e9ec
mov dword [ebp - 0x30], 0x60
mov dword [ebp - 0x34], 0x27
jmp 0x4ad0ea5d
add edi, esi
dec ecx
push edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], ecx
call fcn.4ad02d9a
mov dword [ebp - 4], eax
cmp word [eax], 0x22
jne 0x4ad0eaf4
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 4]
sub eax, esi
mov dword [ebp - 4], eax
cmp eax, edi
jb 0x4ad0eaf4
cmp word [eax], 0x20
jne 0x4ad0eaf4
jmp 0x4ad14916
mov dword [ebp - 0x20], ebx
jmp 0x4ad0eb6c
push ebx
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
push 8
pop eax
jmp 0x4ad0ed76
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad0ab8b
add esp, 0xc
jmp 0x4ad14947
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4ad14947