Function at 0x4ad0a9f0
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 8
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x40], 0x3b
call fcn.4ad01758
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x4ad0aa26
push 0x4ad07e40
push eax
call dword [sym.imp.vmsvcrt.dll_wcscpy]
pop ecx
pop ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4c]
cmp eax, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x24], edi
je 0x4ad0ac52
mov ecx, eax
mov dword [ebp - 4], ecx
mov ax, word [ecx]
cmp ax, 0x22
jne 0x4ad12342
inc ecx
inc ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x4ad0ac52
mov edi, dword [sym.imp.vmsvcrt.dll__wcsnicmp]
mov ax, word [ecx]
test ax, ax
je 0x4ad0abb3
cmp ax, 0x20
jbe 0x4ad12355
mov ebx, dword [ebp - 0x28]
cmp word [ecx], bx
je 0x4ad0abb3
push 8
push 0x4ad0adc0
push ecx
call edi
add esp, 0xc
test eax, eax
je 0x4ad1236b
push 7
push 0x4ad0adb0
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1237b
push 4
push 0x4ad0ada4
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1238b
push 7
push 0x4ad0ad94
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1239f
push 5
push 0x4ad0ad88
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1241a
push 7
push 0x4ad0ad78
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
jne 0x4ad1243a
add dword [ebp - 4], 0xe
mov eax, dword [ebp - 4]
mov ax, word [eax]
xor ebx, ebx
cmp ax, bx
mov dword [ebp - 0x20], ebx
je 0x4ad0aba0
cmp ax, word [ebp - 0x28]
je 0x4ad0aba0
cmp ax, 0x2a
je 0x4ad0ae78
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
call dword [sym.imp.vmsvcrt.dll_wcstol]
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4ad1243a
mov eax, dword [ebp - 4]
cmp word [eax], 0x2d
je 0x4ad12454
mov eax, esi
cmp eax, 0x20
jge 0x4ad0ab81
cmp esi, eax
jg 0x4ad0ab81
sub eax, esi
inc eax
lea ecx, [esi - 1]
add ebx, eax
xor edx, edx
inc edx
shl edx, cl
or dword [ebp - 0x20], edx
inc ecx
dec eax
jne 0x4ad0ab75
mov eax, dword [ebp - 4]
mov ax, word [eax]
cmp ax, 0x2c
jne 0x4ad0adf9
add dword [ebp - 4], 2
mov eax, dword [ebp - 4]
mov ax, word [eax]
test ax, ax
jne 0x4ad0ab29
cmp ebx, dword [ebp - 0xc]
jle 0x4ad0aba8
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4ad0aa6b
cmp dword [ebp - 0xc], 1
jle 0x4ad0ac52
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0xc]
lea esi, [edi + eax]
lea eax, [esi + esi]
push eax
push dword [0x4ad33b10]
call fcn.4ad0177c
mov dword [0x4ad33b10], eax
mov eax, esi
shl eax, 2
push eax
push dword [0x4ad33b0c]
call fcn.4ad0177c
cmp dword [0x4ad33b10], 0
mov dword [0x4ad33b0c], eax
je 0x4ad12471
test eax, eax
je 0x4ad12471
xor edx, edx
inc edx
cmp edi, edx
jle 0x4ad0ac43
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 [0x4ad33b10]
add si, dx
mov word [eax + edi], si
mov esi, dword [0x4ad33b0c]
and dword [ecx + esi], 0
inc edx
inc eax
inc eax
add ecx, 4
cmp edx, dword [ebp - 0xc]
jl 0x4ad0ac1a
mov eax, dword [ebp + 0xc]
add edx, eax
mov eax, dword [0x4ad33b10]
and word [eax + edx*2], 0
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x3c]
xor esi, esi
cmp dword [ebp - 0x24], esi
mov dword [ebp - 8], ebx
jne 0x4ad12484
mov dword [ebp - 0x2c], 0x27
mov dword [ebp - 0x30], 0x22
cmp ebx, esi
je 0x4ad124a1
mov ax, word [ebx]
cmp ax, word [ebp - 0x2c]
jne 0x4ad12497
cmp word [ebx], si
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], esi
je 0x4ad0b0ce
cmp byte [0x4ad2faa0], 0
jne 0x4ad0b0ce
call fcn.4ad07fc8
call fcn.4ad05bed
mov eax, dword [ebp - 0x50]
xor esi, esi
push ebx
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], eax
call dword [sym.imp.vmsvcrt.dll_wcslen]
mov edx, dword [ebp - 0x2c]
pop ecx
mov ecx, eax
mov ax, word [ebx]
cmp ax, dx
mov dword [ebp - 0x28], ecx
jne 0x4ad0ae85
cmp ecx, 1
jle 0x4ad0ae85
cmp word [ebx + ecx*2 - 2], dx
jne 0x4ad0ae85
sub dword [ebp - 0x28], 2
mov eax, dword [ebp - 0x28]
inc ebx
inc ebx
and word [ebx + eax*2], si
push 0x4ad0ad70
push ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.vmsvcrt.dll__wpopen]
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x4ad125bc
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [edi + 0xc]
test al, 0x10
jne 0x4ad0b025
test al, 0x20
jne 0x4ad0b025
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, 0x200
jb 0x4ad0add2
mov ecx, dword [ebp - 0x10]
push edi
sub ecx, esi
lea eax, [ebx + esi]
push ecx
push eax
mov byte [eax], 0
call dword [sym.imp.vmsvcrt.dll_fgets]
add esp, 0xc
test eax, eax
je 0x4ad0b025
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4ad0ad64
sub esi, ecx
jmp 0x4ad0ad1d
add dword [ebp - 0x10], 0x100
test ebx, ebx
push dword [ebp - 0x10]
je 0x4ad0ae6e
push ebx
call fcn.4ad0177c
mov ebx, eax
test ebx, ebx
jne 0x4ad0ad40
jmp 0x4ad125c6
cmp ax, 0x2a
jne 0x4ad0aba0
jmp 0x4ad0ab95
call fcn.4ad01711
jmp 0x4ad0adea
add dword [ebp - 4], 2
inc ebx
mov dword [ebp - 0x44], ebx
jmp 0x4ad0aba0
mov edx, dword [ebp - 0x30]
cmp ax, dx
je 0x4ad124b3
jmp 0x4ad124d9
xor edx, edx
jmp 0x4ad0afbd
dec dword [ebp - 0x14]
jmp 0x4ad0af6a
xor eax, eax
mov ax, word [esi]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.vmsvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x4ad0aec1
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad0aea5
cmp edi, esi
je 0x4ad0aef2
cmp dword [ebp - 8], 0x20
jge 0x4ad0aef2
mov ecx, dword [ebp - 8]
xor eax, eax
inc eax
shl eax, cl
and eax, dword [ebp - 0x20]
inc dword [ebp - 8]
test eax, eax
je 0x4ad0aef2
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x4ad33b0c]
inc dword [ebp - 0x10]
add dword [ebp - 0x38], 4
inc dword [ebp - 0x3c]
mov dword [ecx + eax], edi
cmp word [esi], 0
je 0x4ad0af44
and word [esi], 0
inc esi
inc esi
cmp word [esi], 0
je 0x4ad0af44
xor edi, edi
cmp word [esi], di
je 0x4ad0af24
xor eax, eax
mov ax, word [esi]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.vmsvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x4ad0af24
inc esi
inc esi
jmp 0x4ad0af06
cmp dword [ebp - 8], edi
je 0x4ad0b013
mov eax, dword [ebp - 0x44]
test eax, eax
mov edi, esi
jne 0x4ad12593
cmp word [esi], 0
jne 0x4ad0aea5
cmp dword [ebp - 0x10], 0
je 0x4ad0af6a
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x40]
call fcn.4ad07f8f
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
call fcn.4ad07fdb
and dword [ebp + 0x10], 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x24]
jae 0x4ad0b0ac
cmp byte [0x4ad2faa0], 0
jne 0x4ad0b0ac
call fcn.4ad05bed
mov esi, dword [ebp - 4]
push 0xa
push esi
call dword [sym.imp.vmsvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x4ad0b0ac
cmp eax, esi
jbe 0x4ad0ae96
cmp word [eax - 2], 0xd
jne 0x4ad0ae96
xor edx, edx
mov word [eax - 2], dx
mov eax, dword [ebp - 4]
mov word [eax], dx
add dword [ebp - 4], 2
cmp dword [ebp - 0x14], edx
jne 0x4ad0ae9d
mov ecx, dword [ebp - 0xc]
cmp ecx, 1
jle 0x4ad0afef
mov eax, dword [ebp + 0xc]
lea eax, [eax*4 + 4]
dec ecx
mov edi, dword [0x4ad33b0c]
mov dword [eax + edi], edx
add eax, 4
dec ecx
jne 0x4ad0afe0
cmp word [esi], dx
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], edx
je 0x4ad0af6a
mov eax, dword [ebp + 0xc]
shl eax, 2
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], eax
jmp 0x4ad0af04
mov ax, word [ebp - 0x40]
cmp word [esi], ax
jne 0x4ad0af2d
jmp 0x4ad0af44
push edi
call dword [sym.imp.vmsvcrt.dll__pclose]
pop ecx
lea eax, [esi + esi + 4]
push eax
push ebx
call fcn.4ad0177c
cmp dword [0x4ad33b10], 0
mov ebx, eax
je 0x4ad125e1
cmp dword [0x4ad33b0c], 0
je 0x4ad125e1
push esi
lea eax, [ebx + esi]
push ebx
push eax
call dword [sym.imp.vmsvcrt.dll_memmove]
add esp, 0xc
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x34], esi
push esi
push ebx
push esi
add esi, ebx
push esi
push 1
push dword [0x4ad2b9ec]
call dword [sym.imp.vKERNEL32.dll_MultiByteToWideChar]
lea eax, [ebx + eax*2]
cmp eax, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], eax
je 0x4ad12584
cmp word [eax - 2], 0xa
jne 0x4ad12584
and word [eax], 0
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 4], eax
jb 0x4ad0af76
cmp dword [ebp - 0x18], 0
je 0x4ad0b0ba
push dword [ebp - 0x18]
call fcn.4ad05f4e
mov eax, dword [ebp - 0x28]
lea ebx, [ebx + eax*2 + 2]
cmp word [ebx], 0
mov dword [ebp - 8], ebx
jne 0x4ad0ac9b
cmp dword [ebp - 0xc], 1
jle 0x4ad0b0f5
mov eax, dword [0x4ad33b10]
xor edx, edx
cmp eax, edx
je 0x4ad0b0f5
cmp word [eax], dx
je 0x4ad0b0f5
mov ecx, dword [ebp + 0xc]
mov word [eax + ecx*2 + 2], dx
mov eax, dword [0x4ad33b0c]
mov dword [eax + ecx*4 + 4], edx
mov eax, dword [ebp - 0x4c]
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp ax, 0x27
je 0x4ad0aa55
and dword [ebp - 0x28], 0
jmp 0x4ad0aa5d
inc ecx
inc ecx
mov dword [ebp - 4], ecx
mov ax, word [ecx]
test ax, ax
je 0x4ad0aa81
jmp 0x4ad0aa77
add dword [ebp - 4], 0x10
mov dword [ebp - 0x24], 1
jmp 0x4ad0aba8
add dword [ebp - 4], 0xe
mov dword [ebp - 0x24], 1
jmp 0x4ad0aba8
mov eax, dword [ebp - 4]
mov ax, word [eax + 8]
add dword [ebp - 4], 0xa
mov word [ebp - 0x40], ax
jmp 0x4ad0aba8
mov eax, dword [ebp - 4]
add eax, 0xe
mov esi, eax
jmp 0x4ad123bc
cmp cx, bx
je 0x4ad123c7
cmp cx, 0x20
jne 0x4ad123ba
cmp word [eax + 2], bx
jne 0x4ad123c7
inc eax
inc eax
mov dword [ebp - 4], eax
mov cx, word [eax]
test cx, cx
jne 0x4ad123a9
push dword [ebp - 0x1c]
call fcn.4ad05f4e
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
call fcn.4ad01758
mov ebx, eax
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
push eax
push esi
push ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.vmsvcrt.dll_wcsncpy]
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
and word [ebx + eax*2], 0
mov eax, dword [ebp - 4]
add esp, 0xc
cmp word [eax], 0
je 0x4ad0aba8
add dword [ebp - 4], 2
jmp 0x4ad0aba8
add dword [ebp - 4], 0xa
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
call dword [sym.imp.vmsvcrt.dll_wcstol]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x14], eax
jg 0x4ad0aba8
push dword [ebp - 4]
push 1
push 0x234a
call fcn.4ad05fb5
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4ad0b0f8
push 0
lea ecx, [ebp - 4]
push ecx
add eax, 2
push eax
call dword [sym.imp.vmsvcrt.dll_wcstol]
add esp, 0xc
test eax, eax
jg 0x4ad0ab64
jmp 0x4ad1243a
push 0
push 0x2374
call fcn.4ad05fb5
pop ecx
pop ecx
call fcn.4ad1dfe2
mov dword [ebp - 0x2c], 0x60
mov dword [ebp - 0x30], 0x27
jmp 0x4ad0ac74
cmp ax, word [ebp - 0x30]
je 0x4ad0ac89
push esi
push esi
push ebx
call fcn.4ad017d6
mov ebx, eax
mov dword [ebp - 8], ebx
jmp 0x4ad0ac89
cmp ecx, 1
jle 0x4ad124d9
add ecx, ecx
cmp word [ecx + ebx - 2], dx
jne 0x4ad124d9
mov word [ecx + ebx - 2], 0xa
inc ebx
inc ebx
lea eax, [ecx + ebx - 2]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], eax
jmp 0x4ad0b0a0
cmp ax, 0x22
jne 0x4ad12508
inc ebx
inc ebx
push ebx
mov dword [ebp - 8], ebx
call fcn.4ad01a79
mov dword [ebp - 4], eax
cmp word [eax], 0x22
jne 0x4ad12508
mov word [eax], si
mov eax, dword [ebp - 4]
dec eax
dec eax
cmp eax, ebx
mov dword [ebp - 4], eax
jb 0x4ad12508
cmp word [eax], 0x20
je 0x4ad124f3
xor eax, eax
push eax
push eax
push 3
push eax
push 5
push 0x80000000
push ebx
call dword [sym.imp.vKERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4ad125f5
push 2
push 0
push 0
push edi
call dword [sym.imp.vKERNEL32.dll_SetFilePointer]
mov esi, eax
xor eax, eax
push eax
push eax
push eax
push edi
call dword [sym.imp.vKERNEL32.dll_SetFilePointer]
lea eax, [esi + esi + 4]
push eax
call fcn.4ad01711
test eax, eax
mov dword [ebp - 0x18], eax
je 0x4ad12610
or dword [ebp - 0x34], 0xffffffff
push 0
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x18]
push esi
add eax, esi
push eax
push edi
call dword [sym.imp.vKERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.vKERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x34], esi
jne 0x4ad125b4
mov ebx, dword [ebp - 0x18]
jmp 0x4ad0b069
mov word [eax], 0xa
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x4ad0b099
cmp dword [ebp - 0x3c], eax
jne 0x4ad0af3a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [0x4ad33b0c]
inc dword [ebp - 0x10]
mov dword [eax + ecx*4], esi
jmp 0x4ad0af44
mov ebx, dword [ebp - 8]
jmp 0x4ad0b0ac
push ebx
push 1
push 0x2331
jmp 0x4ad125fd
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad05fb5
push edi
call dword [sym.imp.vmsvcrt.dll__pclose]
add esp, 0x10
jmp 0x4ad12627
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad05fb5
add esp, 0xc
jmp 0x4ad12627
push ebx
push 1
push 0x2363
call fcn.4ad05fb5
add esp, 0xc
call dword [sym.imp.vKERNEL32.dll_GetLastError]
jmp 0x4ad0b0f8
push ebx
push 1
push 0x2374
call fcn.4ad05fb5
add esp, 0xc
push edi
call dword [sym.imp.vKERNEL32.dll_CloseHandle]
push 8
pop eax
jmp 0x4ad0b0f8