Function at 0x4ad0a8b5
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.4ad0176c
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x4ad0a8eb
push 0x4ad09de0
push eax
call dword [sym.imp.msvcrt.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 0x4ad0ab17
mov ecx, eax
mov dword [ebp - 4], ecx
mov ax, word [ecx]
cmp ax, 0x22
jne 0x4ad12332
inc ecx
inc ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x4ad0ab17
mov edi, dword [sym.imp.msvcrt.dll__wcsnicmp]
mov ax, word [ecx]
test ax, ax
je 0x4ad0aa78
cmp ax, 0x20
jbe 0x4ad12345
mov ebx, dword [ebp - 0x28]
cmp word [ecx], bx
je 0x4ad0aa78
push 8
push 0x4ad0ac84
push ecx
call edi
add esp, 0xc
test eax, eax
je 0x4ad1235b
push 7
push 0x4ad0ac74
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1236b
push 4
push 0x4ad0ac68
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1237b
push 7
push 0x4ad0ac58
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1238f
push 5
push 0x4ad0ac4c
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1240a
push 7
push 0x4ad0ac3c
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
jne 0x4ad1242a
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 0x4ad0aa65
cmp ax, word [ebp - 0x28]
je 0x4ad0aa65
cmp ax, 0x2a
je 0x4ad0ad3c
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 0x4ad1242a
mov eax, dword [ebp - 4]
cmp word [eax], 0x2d
je 0x4ad12444
mov eax, esi
cmp eax, 0x20
jge 0x4ad0aa46
cmp esi, eax
jg 0x4ad0aa46
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 0x4ad0aa3a
mov eax, dword [ebp - 4]
mov ax, word [eax]
cmp ax, 0x2c
jne 0x4ad0acbd
add dword [ebp - 4], 2
mov eax, dword [ebp - 4]
mov ax, word [eax]
test ax, ax
jne 0x4ad0a9ee
cmp ebx, dword [ebp - 0xc]
jle 0x4ad0aa6d
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4ad0a930
cmp dword [ebp - 0xc], 1
jle 0x4ad0ab17
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.4ad01790
mov dword [0x4ad33b10], eax
mov eax, esi
shl eax, 2
push eax
push dword [0x4ad33b0c]
call fcn.4ad01790
cmp dword [0x4ad33b10], 0
mov dword [0x4ad33b0c], eax
je 0x4ad12460
test eax, eax
je 0x4ad12460
xor edx, edx
inc edx
cmp edi, edx
jle 0x4ad0ab08
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 0x4ad0aadf
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 0x4ad12473
mov dword [ebp - 0x2c], 0x27
mov dword [ebp - 0x30], 0x22
cmp ebx, esi
je 0x4ad12490
mov ax, word [ebx]
cmp ax, word [ebp - 0x2c]
jne 0x4ad12486
cmp word [ebx], si
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], esi
je 0x4ad0af92
cmp byte [0x4ad2faa0], 0
jne 0x4ad0af92
call fcn.4ad100e1
call fcn.4ad05bfd
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.msvcrt.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 0x4ad0ad49
cmp ecx, 1
jle 0x4ad0ad49
cmp word [ebx + ecx*2 - 2], dx
jne 0x4ad0ad49
sub dword [ebp - 0x28], 2
mov eax, dword [ebp - 0x28]
inc ebx
inc ebx
and word [ebx + eax*2], si
push 0x4ad0ac34
push ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.msvcrt.dll__wpopen]
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x4ad125ab
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [edi + 0xc]
test al, 0x10
jne 0x4ad0aee9
test al, 0x20
jne 0x4ad0aee9
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, 0x200
jb 0x4ad0ac96
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.msvcrt.dll_fgets]
add esp, 0xc
test eax, eax
je 0x4ad0aee9
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4ad0ac29
sub esi, ecx
jmp 0x4ad0abe2
add dword [ebp - 0x10], 0x100
test ebx, ebx
push dword [ebp - 0x10]
je 0x4ad0ad32
push ebx
call fcn.4ad01790
mov ebx, eax
test ebx, ebx
je 0x4ad125b5
jmp 0x4ad0ac05
cmp ax, 0x2a
je 0x4ad0aa5a
jmp 0x4ad0aa65
call fcn.4ad01725
jmp 0x4ad0acae
add dword [ebp - 4], 2
inc ebx
mov dword [ebp - 0x44], ebx
jmp 0x4ad0aa65
mov edx, dword [ebp - 0x30]
cmp ax, dx
jne 0x4ad124c8
jmp 0x4ad124a2
xor edx, edx
jmp 0x4ad0ae81
dec dword [ebp - 0x14]
jmp 0x4ad0ae2e
xor eax, eax
mov ax, word [esi]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x4ad0ad85
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad0ad69
cmp edi, esi
je 0x4ad0adb6
cmp dword [ebp - 8], 0x20
jge 0x4ad0adb6
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 0x4ad0adb6
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 0x4ad0ae08
and word [esi], 0
inc esi
inc esi
cmp word [esi], 0
je 0x4ad0ae08
xor edi, edi
cmp word [esi], di
je 0x4ad0ade8
xor eax, eax
mov ax, word [esi]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x4ad0ade8
inc esi
inc esi
jmp 0x4ad0adca
cmp dword [ebp - 8], edi
je 0x4ad0aed7
mov eax, dword [ebp - 0x44]
test eax, eax
mov edi, esi
jne 0x4ad12582
cmp word [esi], 0
jne 0x4ad0ad69
cmp dword [ebp - 0x10], 0
je 0x4ad0ae2e
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x40]
call fcn.4ad100a8
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
call fcn.4ad100f4
and dword [ebp + 0x10], 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x24]
jae 0x4ad0af70
cmp byte [0x4ad2faa0], 0
jne 0x4ad0af70
call fcn.4ad05bfd
mov esi, dword [ebp - 4]
push 0xa
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x4ad0af70
cmp eax, esi
jbe 0x4ad0ad5a
cmp word [eax - 2], 0xd
jne 0x4ad0ad5a
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 0x4ad0ad61
mov ecx, dword [ebp - 0xc]
cmp ecx, 1
jle 0x4ad0aeb3
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 0x4ad0aea4
cmp word [esi], dx
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], edx
je 0x4ad0ae2e
mov eax, dword [ebp + 0xc]
shl eax, 2
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], eax
jmp 0x4ad0adc8
mov ax, word [ebp - 0x40]
cmp word [esi], ax
je 0x4ad0ae08
jmp 0x4ad0adf1
push edi
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
lea eax, [esi + esi + 4]
push eax
push ebx
call fcn.4ad01790
cmp dword [0x4ad33b10], 0
mov ebx, eax
je 0x4ad125d0
cmp dword [0x4ad33b0c], 0
je 0x4ad125d0
push esi
lea eax, [ebx + esi]
push ebx
push eax
call dword [sym.imp.msvcrt.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.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebx + eax*2]
cmp eax, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], eax
je 0x4ad12573
cmp word [eax - 2], 0xa
jne 0x4ad12573
and word [eax], 0
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 4], eax
jb 0x4ad0ae3a
cmp dword [ebp - 0x18], 0
je 0x4ad0af7e
push dword [ebp - 0x18]
call fcn.4ad05fcd
mov eax, dword [ebp - 0x28]
lea ebx, [ebx + eax*2 + 2]
cmp word [ebx], 0
mov dword [ebp - 8], ebx
jne 0x4ad0ab60
cmp dword [ebp - 0xc], 1
jle 0x4ad0afb9
mov eax, dword [0x4ad33b10]
xor edx, edx
cmp eax, edx
je 0x4ad0afb9
cmp word [eax], dx
je 0x4ad0afb9
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 0x4ad0a91a
and dword [ebp - 0x28], 0
jmp 0x4ad0a922
inc ecx
inc ecx
mov dword [ebp - 4], ecx
mov ax, word [ecx]
test ax, ax
jne 0x4ad0a93c
jmp 0x4ad0a946
add dword [ebp - 4], 0x10
mov dword [ebp - 0x24], 1
jmp 0x4ad0aa6d
add dword [ebp - 4], 0xe
mov dword [ebp - 0x24], 1
jmp 0x4ad0aa6d
mov eax, dword [ebp - 4]
mov ax, word [eax + 8]
add dword [ebp - 4], 0xa
mov word [ebp - 0x40], ax
jmp 0x4ad0aa6d
mov eax, dword [ebp - 4]
add eax, 0xe
mov esi, eax
jmp 0x4ad123ac
cmp cx, bx
je 0x4ad123b7
cmp cx, 0x20
jne 0x4ad123aa
cmp word [eax + 2], bx
jne 0x4ad123b7
inc eax
inc eax
mov dword [ebp - 4], eax
mov cx, word [eax]
test cx, cx
jne 0x4ad12399
push dword [ebp - 0x1c]
call fcn.4ad05fcd
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
call fcn.4ad0176c
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.msvcrt.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 0x4ad0aa6d
add dword [ebp - 4], 2
jmp 0x4ad0aa6d
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
test eax, eax
mov dword [ebp - 0x14], eax
jg 0x4ad0aa6d
push dword [ebp - 4]
push 1
push 0x234a
call fcn.4ad0606f
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4ad0afbc
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
jle 0x4ad1242a
jmp 0x4ad0aa29
push 0
push 0x2374
call fcn.4ad0606f
pop ecx
pop ecx
call fcn.4ad1dfba
mov dword [ebp - 0x2c], 0x60
mov dword [ebp - 0x30], 0x27
jmp 0x4ad0ab39
cmp ax, word [ebp - 0x30]
je 0x4ad0ab4e
push esi
push esi
push ebx
call fcn.4ad017ea
mov ebx, eax
mov dword [ebp - 8], ebx
jmp 0x4ad0ab4e
cmp ecx, 1
jle 0x4ad124c8
add ecx, ecx
cmp word [ecx + ebx - 2], dx
jne 0x4ad124c8
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 0x4ad0af64
cmp ax, 0x22
jne 0x4ad124f7
inc ebx
inc ebx
push ebx
mov dword [ebp - 8], ebx
call fcn.4ad01a8d
mov dword [ebp - 4], eax
cmp word [eax], 0x22
jne 0x4ad124f7
mov word [eax], si
mov eax, dword [ebp - 4]
dec eax
dec eax
cmp eax, ebx
mov dword [ebp - 4], eax
jb 0x4ad124f7
cmp word [eax], 0x20
je 0x4ad124e2
xor eax, eax
push eax
push eax
push 3
push eax
push 5
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4ad125e4
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
xor eax, eax
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esi + esi + 4]
push eax
call fcn.4ad01725
test eax, eax
mov dword [ebp - 0x18], eax
je 0x4ad125ff
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.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x34], esi
jne 0x4ad125a3
mov ebx, dword [ebp - 0x18]
jmp 0x4ad0af2d
mov word [eax], 0xa
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x4ad0af5d
cmp dword [ebp - 0x3c], eax
jne 0x4ad0adfe
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 0x4ad0ae08
mov ebx, dword [ebp - 8]
jmp 0x4ad0af70
push ebx
push 1
push 0x2331
jmp 0x4ad125ec
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad0606f
push edi
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 0x10
jmp 0x4ad12616
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad0606f
add esp, 0xc
jmp 0x4ad12616
push ebx
push 1
push 0x2363
call fcn.4ad0606f
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad0afbc
push ebx
push 1
push 0x2374
call fcn.4ad0606f
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
pop eax
jmp 0x4ad0afbc