Function at 0x4ad063ec
Capabilities:
Read file on windows

Disassembly:
add dword [ebp - 4], 0x10
mov dword [ebp - 0x24], 1
jmp 0x4ad0659e
cmp dword [ebp - 8], edi
jne 0x4ad0630e
mov ax, word [ebp - 0x40]
cmp word [esi], ax
je 0x4ad06384
mov eax, dword [ebp - 0x44]
test eax, eax
mov edi, esi
jne 0x4ad0686e
cmp word [esi], 0
je 0x4ad06384
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 0x4ad0633d
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad06321
cmp edi, esi
je 0x4ad0636e
cmp dword [ebp - 8], 0x20
jge 0x4ad0636e
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 0x4ad0636e
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x4ad30b0c]
inc dword [ebp - 0x10]
add dword [ebp - 0x38], 4
inc dword [ebp - 0x3c]
mov dword [ecx + eax], edi
cmp word [esi], 0
je 0x4ad06384
and word [esi], 0
inc esi
inc esi
cmp word [esi], 0
jne 0x4ad067c3
cmp dword [ebp - 0x10], 0
je 0x4ad063aa
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x40]
call fcn.4ad0275d
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
call fcn.4ad0278d
and dword [ebp + 0x10], 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x24]
jb 0x4ad06741
cmp dword [ebp - 0x18], 0
je 0x4ad063c4
push dword [ebp - 0x18]
call fcn.4ad03c06
mov eax, dword [ebp - 0x28]
lea ebx, [ebx + eax*2 + 2]
cmp word [ebx], 0
mov dword [ebp - 8], ebx
jne 0x4ad06607
cmp dword [ebp - 0xc], 1
jg 0x4ad06ac0
mov eax, dword [ebp - 0x4c]
pop edi
pop esi
pop ebx
leave
ret 0xc
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.4ad01566
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x4ad06420
push 0x4ad0bb30
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 0x4ad065b3
mov ecx, eax
mov dword [ebp - 4], ecx
mov ax, word [ecx]
cmp ax, 0x22
jne 0x4ad10364
inc ecx
inc ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x4ad065b3
mov edi, dword [sym.imp.msvcrt.dll__wcsnicmp]
mov ax, word [ecx]
test ax, ax
je 0x4ad065a9
cmp ax, 0x20
jbe 0x4ad0684b
mov ebx, dword [ebp - 0x28]
cmp word [ecx], bx
je 0x4ad065a9
push 8
push 0x4ad0bbe4
push ecx
call edi
add esp, 0xc
test eax, eax
je 0x4ad05693
push 7
push 0x4ad0bbd4
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad10377
push 4
push 0x4ad0bbc8
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad10387
push 7
push 0x4ad0bbb8
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad06972
push 5
push 0x4ad0bbac
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad1039b
push 7
push 0x4ad0bb9c
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
jne 0x4ad103bb
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 0x4ad06595
cmp ax, word [ebp - 0x28]
je 0x4ad06595
cmp ax, 0x2a
je 0x4ad06861
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 0x4ad103bb
mov eax, dword [ebp - 4]
cmp word [eax], 0x2d
je 0x4ad103d5
mov eax, esi
cmp eax, 0x20
jge 0x4ad0657b
cmp esi, eax
jg 0x4ad0657b
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 0x4ad0656f
mov eax, dword [ebp - 4]
mov ax, word [eax]
cmp ax, 0x2c
je 0x4ad06aee
cmp ax, 0x2a
je 0x4ad06a0a
cmp ebx, dword [ebp - 0xc]
jg 0x4ad06a1e
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4ad06465
cmp dword [ebp - 0xc], 1
jg 0x4ad06a26
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x3c]
xor esi, esi
cmp dword [ebp - 0x24], esi
mov dword [ebp - 8], ebx
je 0x4ad0b0d6
mov dword [ebp - 0x2c], 0x60
mov dword [ebp - 0x30], 0x27
cmp ebx, esi
je 0x4ad065e8
mov ax, word [ebx]
cmp ax, word [ebp - 0x2c]
je 0x4ad065f5
cmp ax, word [ebp - 0x30]
je 0x4ad065f5
push esi
push esi
push ebx
call fcn.4ad01580
mov ebx, eax
mov dword [ebp - 8], ebx
cmp word [ebx], si
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], esi
je 0x4ad063d8
cmp byte [0x4ad2caa0], 0
jne 0x4ad063d8
call fcn.4ad027a2
call fcn.4ad01890
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
je 0x4ad09ed8
mov edx, dword [ebp - 0x30]
cmp ax, dx
je 0x4ad0b241
cmp ax, 0x22
jne 0x4ad06683
inc ebx
inc ebx
push ebx
mov dword [ebp - 8], ebx
call fcn.4ad01d2c
mov dword [ebp - 4], eax
cmp word [eax], 0x22
jne 0x4ad06683
mov word [eax], si
mov eax, dword [ebp - 4]
dec eax
dec eax
cmp eax, ebx
mov dword [ebp - 4], eax
jb 0x4ad06683
cmp word [eax], 0x20
je 0x4ad0666e
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 0x4ad10442
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.4ad01302
test eax, eax
mov dword [ebp - 0x18], eax
je 0x4ad1045d
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 0x4ad0b239
mov ebx, dword [ebp - 0x18]
push esi
push ebx
push esi
add esi, ebx
push esi
push 1
push dword [0x4ad289ec]
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 0x4ad0688f
cmp word [eax - 2], 0xa
jne 0x4ad0688f
and word [eax], 0
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 4], eax
jae 0x4ad063b6
cmp byte [0x4ad2caa0], 0
jne 0x4ad063b6
call fcn.4ad01890
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 0x4ad063b6
cmp eax, esi
jbe 0x4ad0b22a
cmp word [eax - 2], 0xd
jne 0x4ad0b22a
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 0x4ad0b231
mov ecx, dword [ebp - 0xc]
cmp ecx, 1
jg 0x4ad069eb
cmp word [esi], dx
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], edx
je 0x4ad063aa
mov eax, dword [ebp + 0xc]
shl eax, 2
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], eax
xor edi, edi
cmp word [esi], di
je 0x4ad06300
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 0x4ad06300
inc esi
inc esi
jmp 0x4ad067c5
inc ecx
inc ecx
mov dword [ebp - 4], ecx
mov ax, word [ecx]
test ax, ax
jne 0x4ad06471
jmp 0x4ad0647b
add dword [ebp - 4], 2
inc ebx
mov dword [ebp - 0x44], ebx
jmp 0x4ad06595
cmp dword [ebp - 0x3c], eax
jne 0x4ad0631b
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [0x4ad30b0c]
inc dword [ebp - 0x10]
mov dword [eax + ecx*4], esi
jmp 0x4ad06384
mov word [eax], 0xa
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x4ad0672e
mov eax, dword [ebp - 4]
add eax, 0xe
mov esi, eax
jmp 0x4ad0698d
cmp cx, bx
je 0x4ad06998
cmp cx, 0x20
je 0x4ad06af7
inc eax
inc eax
mov dword [ebp - 4], eax
mov cx, word [eax]
test cx, cx
jne 0x4ad0697c
push dword [ebp - 0x1c]
call fcn.4ad03c06
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
call fcn.4ad01566
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 0x4ad0659e
add dword [ebp - 4], 2
jmp 0x4ad0659e
mov eax, dword [ebp + 0xc]
lea eax, [eax*4 + 4]
dec ecx
mov edi, dword [0x4ad30b0c]
mov dword [eax + edi], edx
add eax, 4
dec ecx
jne 0x4ad069f6
jmp 0x4ad067a4
mov eax, dword [ebp - 4]
mov ax, word [eax]
test ax, ax
jne 0x4ad06523
jmp 0x4ad06595
mov dword [ebp - 0xc], ebx
jmp 0x4ad0659e
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0xc]
lea esi, [edi + eax]
lea eax, [esi + esi]
push eax
push dword [0x4ad30b10]
call fcn.4ad016cb
mov dword [0x4ad30b10], eax
mov eax, esi
shl eax, 2
push eax
push dword [0x4ad30b0c]
call fcn.4ad016cb
cmp dword [0x4ad30b10], 0
mov dword [0x4ad30b0c], eax
je 0x4ad103f1
test eax, eax
je 0x4ad103f1
xor edx, edx
inc edx
cmp edi, edx
jle 0x4ad06aac
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 [0x4ad30b10]
add si, dx
mov word [eax + edi], si
mov esi, dword [0x4ad30b0c]
and dword [ecx + esi], 0
inc edx
inc eax
inc eax
add ecx, 4
cmp edx, dword [ebp - 0xc]
jl 0x4ad06a83
mov eax, dword [ebp + 0xc]
add edx, eax
mov eax, dword [0x4ad30b10]
and word [eax + edx*2], 0
jmp 0x4ad065b3
mov eax, dword [0x4ad30b10]
xor edx, edx
cmp eax, edx
je 0x4ad063e2
cmp word [eax], dx
je 0x4ad063e2
mov ecx, dword [ebp + 0xc]
mov word [eax + ecx*2 + 2], dx
mov eax, dword [0x4ad30b0c]
mov dword [eax + ecx*4 + 4], edx
jmp 0x4ad063e2
add dword [ebp - 4], 2
jmp 0x4ad06a0a
cmp word [eax + 2], bx
jne 0x4ad06998
jmp 0x4ad0698b
mov al, byte [esi]
inc esi
test al, al
jne 0x4ad09e0f
sub esi, ecx
mov eax, dword [edi + 0xc]
test al, 0x10
jne 0x4ad09e6f
test al, 0x20
jne 0x4ad09e6f
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, 0x200
jae 0x4ad09e50
add dword [ebp - 0x10], 0x100
test ebx, ebx
push dword [ebp - 0x10]
jne 0x4ad0a1f9
call fcn.4ad01302
mov ebx, eax
test ebx, ebx
je 0x4ad10413
mov ecx, dword [ebp - 0x10]
push edi
sub ecx, esi
lea eax, [ebx + esi]
and byte [eax], 0
push ecx
push eax
call dword [sym.imp.msvcrt.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x4ad0a1ef
push edi
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
lea eax, [esi + esi + 4]
push eax
push ebx
call fcn.4ad016cb
cmp dword [0x4ad30b10], 0
mov ebx, eax
je 0x4ad1042e
cmp dword [0x4ad30b0c], 0
je 0x4ad1042e
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
jmp 0x4ad066fe
cmp ecx, 1
jle 0x4ad06648
cmp word [ebx + ecx*2 - 2], dx
jne 0x4ad06648
sub dword [ebp - 0x28], 2
mov eax, dword [ebp - 0x28]
inc ebx
inc ebx
and word [ebx + eax*2], si
push 0x4ad0bc0c
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 0x4ad10409
xor ebx, ebx
mov dword [ebp - 0x10], ebx
jmp 0x4ad09e18
mov esi, ebx
lea ecx, [esi + 1]
jmp 0x4ad09e0f
push ebx
call fcn.4ad016cb
jmp 0x4ad09e46
mov dword [ebp - 0x2c], 0x27
mov dword [ebp - 0x30], 0x22
jmp 0x4ad065d5
xor edx, edx
jmp 0x4ad06788
dec dword [ebp - 0x14]
jmp 0x4ad063aa
mov ebx, dword [ebp - 8]
jmp 0x4ad063b6
cmp ecx, 1
jle 0x4ad06654
add ecx, ecx
cmp word [ecx + ebx - 2], dx
jne 0x4ad06654
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 0x4ad06735
cmp ax, 0x27
je 0x4ad0644f
and dword [ebp - 0x28], 0
jmp 0x4ad06457
add dword [ebp - 4], 0xe
mov dword [ebp - 0x24], 1
jmp 0x4ad0659e
mov eax, dword [ebp - 4]
mov ax, word [eax + 8]
add dword [ebp - 4], 0xa
mov word [ebp - 0x40], ax
jmp 0x4ad0659e
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 0x4ad0659e
push dword [ebp - 4]
push 1
push 0x234a
call fcn.4ad0b54d
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4ad063e5
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 0x4ad103bb
jmp 0x4ad0655e
push 0
push 0x2374
call fcn.4ad0b54d
pop ecx
pop ecx
call fcn.4ad1b2e7
jmp 0x4ad06a6e
push ebx
push 1
push 0x2331
jmp 0x4ad1044a
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad0b54d
push edi
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 0x10
jmp 0x4ad10474
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad0b54d
add esp, 0xc
jmp 0x4ad10474
push ebx
push 1
push 0x2363
call fcn.4ad0b54d
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad063e5
push ebx
push 1
push 0x2374
call fcn.4ad0b54d
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
pop eax
jmp 0x4ad063e5