Function at 0x4ad0a3c2
Capabilities:
Read file on windows

Disassembly:
add dword [ebp - 4], 2
inc edi
mov dword [ebp - 0x44], edi
jmp 0x4ad0a582
inc ecx
inc ecx
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
jne 0x4ad0a43d
jmp 0x4ad0a447
mov eax, esi
jmp 0x4ad0a54b
inc esi
inc esi
jmp 0x4ad0a7b3
mov eax, dword [ebp - 4]
movzx eax, word [eax]
test ax, ax
jne 0x4ad0a4f3
jmp 0x4ad0a582
add dword [ebp - 4], 2
jmp 0x4ad08162
push ebx
push ebx
push edi
call fcn.4ad01f27
mov edi, eax
mov dword [ebp - 8], eax
jmp 0x4ad0a674
cmp ax, 0x22
je 0x4ad1437d
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 0x4ad10776
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.4ad01e3d
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x4ad143e4
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 0x4ad143b8
cmp dword [ebp - 0x20], esi
jne 0x4ad0ff0a
jmp 0x4ad0a991
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
push edi
xor esi, esi
inc esi
push 0x4ad0422c
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x40], 0x3b
call fcn.4ad06d26
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4c]
xor ebx, ebx
cmp eax, 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
je 0x4ad0a639
mov ecx, eax
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
cmp ax, 0x22
jne 0x4ad14306
movzx eax, ax
inc ecx
inc ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], ecx
cmp ecx, ebx
je 0x4ad0a639
mov ebx, dword [sym.imp.msvcrt.dll__wcsnicmp]
movzx eax, word [ecx]
test ax, ax
je 0x4ad0a595
cmp ax, 0x20
jbe 0x4ad080c7
mov esi, dword [ebp - 0x2c]
cmp word [ecx], si
je 0x4ad0a595
push 8
push 0x4ad0a918
push ecx
call ebx
add esp, 0xc
test eax, eax
je 0x4ad14318
push 7
push 0x4ad0a908
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad14328
push 4
push 0x4ad0a8fc
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad0fef7
push 7
push 0x4ad0a8ec
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad0a9dd
push 5
push 0x4ad0a8e0
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
je 0x4ad107c9
push 7
push 0x4ad0a8d0
push dword [ebp - 4]
call ebx
add esp, 0xc
test eax, eax
jne 0x4ad14338
add dword [ebp - 4], 0xe
mov eax, dword [ebp - 4]
movzx eax, word [eax]
xor edi, edi
cmp ax, di
mov dword [ebp - 0x28], edi
je 0x4ad0a582
cmp ax, word [ebp - 0x2c]
je 0x4ad0a582
cmp ax, 0x2a
je 0x4ad080ba
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 0x4ad14338
mov eax, dword [ebp - 4]
cmp word [eax], 0x2d
jne 0x4ad0813c
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 0x4ad14338
cmp eax, 0x20
jge 0x4ad0a568
cmp esi, eax
jg 0x4ad0a568
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 0x4ad0a55c
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x2c
je 0x4ad08176
cmp ax, 0x2a
je 0x4ad08162
cmp edi, dword [ebp - 0xc]
jle 0x4ad0a58a
mov dword [ebp - 0xc], edi
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4ad0a431
cmp dword [ebp - 0xc], 1
jle 0x4ad0a637
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0xc]
lea esi, [edi + eax]
lea eax, [esi + esi + 2]
push eax
push dword [0x4ad2407c]
call fcn.4ad020f1
mov dword [0x4ad2407c], eax
lea eax, [esi*4 + 4]
push eax
push dword [0x4ad24080]
call fcn.4ad020f1
cmp dword [0x4ad2407c], 0
mov dword [0x4ad24080], eax
je 0x4ad14352
test eax, eax
je 0x4ad14352
xor edx, edx
inc edx
cmp edi, edx
jle 0x4ad0a628
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 [0x4ad2407c]
add si, dx
mov word [edi + eax], si
mov esi, dword [0x4ad24080]
and dword [esi + ecx], 0
inc edx
inc eax
inc eax
add ecx, 4
cmp edx, dword [ebp - 0xc]
jl 0x4ad0a5ff
mov eax, dword [ebp + 0xc]
add edx, eax
mov eax, dword [0x4ad2407c]
and word [eax + edx*2], 0
xor ebx, ebx
cmp dword [ebp - 0x1c], ebx
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x3c]
mov dword [ebp - 8], edi
jne 0x4ad1436a
mov dword [ebp - 0x30], 0x27
mov dword [ebp - 0x34], 0x22
cmp edi, ebx
je 0x4ad0817c
movzx eax, word [edi]
cmp ax, word [ebp - 0x30]
je 0x4ad0a674
cmp ax, word [ebp - 0x34]
jne 0x4ad0817c
cmp word [edi], bx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], ebx
je 0x4ad0a89c
cmp byte [0x4ad24078], 0
jne 0x4ad0a89c
call fcn.4ad09f21
call fcn.4ad04856
mov eax, dword [ebp - 0x50]
xor ebx, ebx
mov dword [ebp - 0x14], eax
mov eax, edi
push 2
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
lea ecx, [eax + 2]
pop esi
mov dx, word [eax]
add eax, esi
cmp dx, bx
jne 0x4ad0a6b3
mov edx, dword [ebp - 0x30]
sub eax, ecx
sar eax, 1
mov ecx, eax
movzx eax, word [edi]
cmp ax, dx
mov dword [ebp - 0x1c], ecx
je 0x4ad0aaf5
mov edx, dword [ebp - 0x34]
cmp ax, dx
jne 0x4ad0818e
cmp ecx, 1
jle 0x4ad0818e
cmp word [edi + ecx*2 - 2], dx
jne 0x4ad0818e
mov word [edi + ecx*2 - 2], 0xa
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
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 4], eax
jae 0x4ad0a87e
cmp byte [0x4ad24078], 0
jne 0x4ad0a87e
call fcn.4ad04856
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 0x4ad0a87e
cmp eax, esi
jbe 0x4ad10fa7
cmp word [eax - 2], 0xd
jne 0x4ad10fa7
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 0x4ad107ee
mov ecx, dword [ebp - 0xc]
cmp ecx, 1
jle 0x4ad0a792
mov eax, dword [ebp + 0xc]
lea eax, [eax*4 + 4]
dec ecx
mov ebx, dword [0x4ad24080]
mov dword [eax + ebx], edx
add eax, 4
dec ecx
jne 0x4ad0a783
cmp word [esi], dx
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], edx
je 0x4ad0a872
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 0x4ad0a7cf
movzx eax, word [esi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x4ad08143
cmp dword [ebp - 8], ebx
je 0x4ad0a92a
mov eax, dword [ebp - 0x44]
test eax, eax
mov ebx, esi
jne 0x4ad0feba
cmp word [esi], 0
je 0x4ad0a84c
movzx eax, word [esi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x4ad0a805
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad0a7eb
cmp ebx, esi
je 0x4ad0a836
cmp dword [ebp - 8], 0x20
jge 0x4ad0a836
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 0x4ad0a836
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x4ad24080]
inc dword [ebp - 0x10]
add dword [ebp - 0x38], 4
inc dword [ebp - 0x3c]
mov dword [eax + ecx], ebx
cmp word [esi], 0
je 0x4ad0a84c
and word [esi], 0
inc esi
inc esi
cmp word [esi], 0
jne 0x4ad0a7b1
cmp dword [ebp - 0x10], 0
je 0x4ad0a872
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x40]
call fcn.4ad09c21
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
call fcn.4ad09c5a
and dword [ebp + 0x10], 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x2c]
jb 0x4ad0a719
cmp dword [ebp - 0x18], 0
jne 0x4ad0a9d0
mov eax, dword [ebp - 0x1c]
lea edi, [edi + eax*2 + 2]
cmp word [edi], 0
mov dword [ebp - 8], edi
jne 0x4ad0a686
cmp dword [ebp - 0xc], 1
jle 0x4ad0a8c3
mov eax, dword [0x4ad2407c]
xor edx, edx
cmp eax, edx
je 0x4ad0a8c3
cmp word [eax], dx
je 0x4ad0a8c3
mov ecx, dword [ebp + 0xc]
mov word [eax + ecx*2 + 2], dx
mov eax, dword [0x4ad24080]
mov 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 0x4ad0a7d8
jmp 0x4ad0a84c
mov edi, dword [ebp - 0x18]
push esi
push edi
push esi
add esi, edi
push esi
push 1
push dword [0x4ad24160]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [edi + eax*2]
cmp eax, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x2c], eax
je 0x4ad106c2
cmp word [eax - 2], 0xa
jne 0x4ad106c2
and word [eax], 0
mov edi, dword [ebp - 8]
jmp 0x4ad0a70d
push dword [ebp - 0x18]
call fcn.4ad01773
jmp 0x4ad0a888
mov eax, dword [ebp - 4]
add eax, 0xe
mov edi, eax
mov dword [ebp - 4], eax
movzx ecx, word [eax]
test cx, cx
jne 0x4ad0a9f2
jmp 0x4ad0aa03
cmp cx, si
je 0x4ad0aa03
cmp cx, 0x20
jne 0x4ad0aa37
cmp word [eax + 2], si
je 0x4ad0aa37
movzx esi, word [eax]
push dword [ebp - 0x24]
and word [eax], 0
call fcn.4ad01773
push edi
call fcn.4ad06d26
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov word [eax], si
mov eax, dword [ebp - 4]
cmp word [eax], 0
je 0x4ad0a58a
add dword [ebp - 4], 2
jmp 0x4ad0a58a
inc eax
inc eax
jmp 0x4ad0a9e5
mov al, byte [esi]
inc esi
test al, al
jne 0x4ad0aa3b
sub esi, ecx
push ebx
call dword [sym.imp.msvcrt.dll_feof]
test eax, eax
pop ecx
jne 0x4ad0aaac
push ebx
call dword [sym.imp.msvcrt.dll_ferror]
test eax, eax
pop ecx
jne 0x4ad0aaac
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, 0x200
jae 0x4ad0aa8a
add dword [ebp - 0x10], 0x100
test edi, edi
push dword [ebp - 0x10]
je 0x4ad0ab46
push edi
call fcn.4ad020f1
mov edi, eax
test edi, edi
je 0x4ad143c0
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
je 0x4ad0aaac
mov esi, edi
lea ecx, [esi + 1]
jmp 0x4ad0aa3b
push ebx
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
lea eax, [esi + esi + 4]
push eax
push edi
call fcn.4ad020f1
cmp dword [0x4ad2407c], 0
mov edi, eax
je 0x4ad143d0
cmp dword [0x4ad24080], 0
je 0x4ad143d0
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 0x4ad0a991
cmp ecx, 1
jle 0x4ad0a6d5
cmp word [edi + ecx*2 - 2], dx
jne 0x4ad0a6d5
sub dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
inc edi
inc edi
and word [edi + eax*2], 0
push 0x4ad0ab40
push edi
mov dword [ebp - 8], edi
call dword [sym.imp.msvcrt.dll__wpopen]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x4ad0ff12
xor edi, edi
mov dword [ebp - 0x10], edi
xor esi, esi
jmp 0x4ad0aa44
call fcn.4ad01e3d
jmp 0x4ad0aa80
cmp dword [ebp - 0x3c], eax
jne 0x4ad0a7e5
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [0x4ad24080]
inc dword [ebp - 0x10]
mov dword [eax + ecx*4], esi
jmp 0x4ad0a84c
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
add dword [ebp - 4], 0xa
mov dword [ebp - 0x40], eax
jmp 0x4ad0a58a
mov edi, dword [ebp - 8]
jmp 0x4ad0a87e
push edi
push 1
push 0x2331
jmp 0x4ad10780
mov word [eax], 0xa
inc eax
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x4ad0a9c4
push dword [ebp - 8]
push 1
push 0x2363
call fcn.4ad080e2
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad0a8c6
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 0x4ad0a58a
jmp 0x4ad14338
dec dword [ebp - 0x14]
jmp 0x4ad0a872
xor edx, edx
jmp 0x4ad0a760
cmp ax, 0x27
je 0x4ad0a418
mov dword [ebp - 0x2c], ebx
jmp 0x4ad0a423
add dword [ebp - 4], 0x10
mov dword [ebp - 0x1c], 1
jmp 0x4ad0a58a
add dword [ebp - 4], 0xe
mov dword [ebp - 0x1c], 1
jmp 0x4ad0a58a
push dword [ebp - 4]
push 1
push 0x234a
call fcn.4ad080e2
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4ad0a8c6
push 0
push 0x2374
call fcn.4ad080e2
pop ecx
pop ecx
call fcn.4ad1f2ea
jmp 0x4ad0a5ea
mov dword [ebp - 0x30], 0x60
mov dword [ebp - 0x34], 0x27
jmp 0x4ad0a659
add edi, esi
dec ecx
push edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], ecx
call fcn.4ad01a37
mov dword [ebp - 4], eax
cmp word [eax], 0x22
jne 0x4ad08198
mov word [eax], bx
mov eax, dword [ebp - 4]
sub eax, esi
cmp eax, edi
mov dword [ebp - 4], eax
jb 0x4ad08198
cmp word [eax], 0x20
jne 0x4ad08198
jmp 0x4ad14399
mov dword [ebp - 0x20], ebx
jmp 0x4ad08210
push ebx
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
push 8
pop eax
jmp 0x4ad0a8c6
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad080e2
add esp, 0xc
jmp 0x4ad143c8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4ad143c8