Function at 0x4ad0ae21
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
push edi
xor edi, edi
mov esi, 0x4ad05870
inc edi
push esi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x40], 0x3b
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
call fcn.4ad026a9
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x4ad0ae63
push esi
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, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x1c], ebx
je 0x4ad0b08f
mov ecx, eax
mov dword [ebp - 4], ecx
mov ax, word [ecx]
cmp ax, 0x22
jne 0x4ad1288e
inc ecx
inc ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x4ad0b08f
mov edi, dword [sym.imp.msvcrt.dll__wcsnicmp]
mov ax, word [ecx]
test ax, ax
je 0x4ad0aff0
cmp ax, 0x20
jbe 0x4ad128a1
mov ebx, dword [ebp - 0x2c]
cmp word [ecx], bx
je 0x4ad0aff0
push 8
push 0x4ad0b21c
push ecx
call edi
add esp, 0xc
test eax, eax
je 0x4ad128b7
push 7
push 0x4ad0b20c
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad128c7
push 4
push 0x4ad0b200
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad128d7
push 7
push 0x4ad0b1f0
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad128eb
push 5
push 0x4ad0b1e4
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
je 0x4ad12966
push 7
push 0x4ad0b1d4
push dword [ebp - 4]
call edi
add esp, 0xc
test eax, eax
jne 0x4ad12986
add dword [ebp - 4], 0xe
mov eax, dword [ebp - 4]
mov ax, word [eax]
xor ebx, ebx
cmp ax, bx
mov dword [ebp - 0x28], ebx
je 0x4ad0afdd
cmp ax, word [ebp - 0x2c]
je 0x4ad0afdd
cmp ax, 0x2a
je 0x4ad0b2b5
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 0x4ad12986
mov eax, dword [ebp - 4]
cmp word [eax], 0x2d
je 0x4ad129a0
mov eax, esi
cmp eax, 0x20
jge 0x4ad0afbe
cmp esi, eax
jg 0x4ad0afbe
sub eax, esi
inc eax
lea ecx, [esi - 1]
add ebx, eax
xor edx, edx
inc edx
shl edx, cl
or dword [ebp - 0x28], edx
inc ecx
dec eax
jne 0x4ad0afb2
mov eax, dword [ebp - 4]
mov ax, word [eax]
cmp ax, 0x2c
jne 0x4ad0b2a6
add dword [ebp - 4], 2
mov eax, dword [ebp - 4]
mov ax, word [eax]
test ax, ax
jne 0x4ad0af66
cmp ebx, dword [ebp - 0xc]
jle 0x4ad0afe5
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x4ad0aea8
cmp dword [ebp - 0xc], 1
jle 0x4ad0b08f
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0xc]
lea esi, [edi + eax]
lea eax, [esi + esi]
push eax
push dword [0x4ad33ad0]
call fcn.4ad026f3
mov dword [0x4ad33ad0], eax
mov eax, esi
shl eax, 2
push eax
push dword [0x4ad33acc]
call fcn.4ad026f3
cmp dword [0x4ad33ad0], 0
mov dword [0x4ad33acc], eax
je 0x4ad129bd
test eax, eax
je 0x4ad129bd
xor edx, edx
inc edx
cmp edi, edx
jle 0x4ad0b080
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 [0x4ad33ad0]
add si, dx
mov word [eax + edi], si
mov esi, dword [0x4ad33acc]
and dword [ecx + esi], 0
inc edx
inc eax
inc eax
add ecx, 4
cmp edx, dword [ebp - 0xc]
jl 0x4ad0b057
mov eax, dword [ebp + 0xc]
add edx, eax
mov eax, dword [0x4ad33ad0]
and word [eax + edx*2], 0
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x3c]
xor esi, esi
cmp dword [ebp - 0x1c], esi
mov dword [ebp - 8], ebx
jne 0x4ad129d6
mov dword [ebp - 0x30], 0x27
mov dword [ebp - 0x34], 0x22
cmp ebx, esi
je 0x4ad129f3
mov ax, word [ebx]
cmp ax, word [ebp - 0x30]
jne 0x4ad129e9
cmp word [ebx], si
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], esi
je 0x4ad0b38b
cmp byte [0x4ad2fa58], 0
jne 0x4ad0b38b
call fcn.4ad0a861
call fcn.4ad04321
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 - 0x30]
pop ecx
mov ecx, eax
mov ax, word [ebx]
cmp ax, dx
mov dword [ebp - 0x1c], ecx
jne 0x4ad0b2c2
cmp ecx, 1
jle 0x4ad0b2c2
cmp word [ebx + ecx*2 - 2], dx
jne 0x4ad0b2c2
sub dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
inc ebx
inc ebx
and word [ebx + eax*2], si
push 0x4ad0b1cc
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 0x4ad12b1e
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [edi + 0xc]
test al, 0x10
jne 0x4ad0b2e2
test al, 0x20
jne 0x4ad0b2e2
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, 0x200
jae 0x4ad0b19b
add dword [ebp - 0x10], 0x100
test ebx, ebx
push dword [ebp - 0x10]
je 0x4ad0b22e
push ebx
call fcn.4ad026f3
mov ebx, eax
test ebx, ebx
je 0x4ad12b28
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 0x4ad0b2e2
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4ad0b1bf
sub esi, ecx
jmp 0x4ad0b15a
call fcn.4ad0206b
jmp 0x4ad0b191
cmp ax, 0x2a
jne 0x4ad0afdd
jmp 0x4ad0afd2
add dword [ebp - 4], 2
inc ebx
mov dword [ebp - 0x44], ebx
jmp 0x4ad0afdd
mov edx, dword [ebp - 0x34]
cmp ax, dx
je 0x4ad12a05
jmp 0x4ad12a2e
xor edx, edx
jmp 0x4ad0b4d4
dec dword [ebp - 0x14]
jmp 0x4ad0b481
push edi
call dword [sym.imp.msvcrt.dll__pclose]
pop ecx
lea eax, [esi + esi + 4]
push eax
push ebx
call fcn.4ad026f3
cmp dword [0x4ad33ad0], 0
mov ebx, eax
je 0x4ad12b43
cmp dword [0x4ad33acc], 0
je 0x4ad12b43
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 - 0x20], esi
push esi
push ebx
push esi
add esi, ebx
push esi
push 1
push dword [0x4ad2b9ac]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebx + eax*2]
cmp eax, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2c], eax
je 0x4ad12ae6
cmp word [eax - 2], 0xa
jne 0x4ad12ae6
and word [eax], 0
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 4], eax
jb 0x4ad0b48d
cmp dword [ebp - 0x18], 0
je 0x4ad0b377
push dword [ebp - 0x18]
call fcn.4ad01573
mov eax, dword [ebp - 0x1c]
lea ebx, [ebx + eax*2 + 2]
cmp word [ebx], 0
mov dword [ebp - 8], ebx
jne 0x4ad0b0d8
cmp dword [ebp - 0xc], 1
jle 0x4ad0b3b2
mov eax, dword [0x4ad33ad0]
xor edx, edx
cmp eax, edx
je 0x4ad0b3b2
cmp word [eax], dx
je 0x4ad0b3b2
mov ecx, dword [ebp + 0xc]
mov word [eax + ecx*2 + 2], dx
mov eax, dword [0x4ad33acc]
mov dword [eax + ecx*4 + 4], edx
mov eax, dword [ebp - 0x4c]
pop edi
pop esi
pop ebx
leave
ret 0xc
xor eax, eax
mov ax, word [esi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x4ad0b3d8
inc esi
inc esi
cmp word [esi], ax
jne 0x4ad0b3bc
cmp edi, esi
je 0x4ad0b409
cmp dword [ebp - 8], 0x20
jge 0x4ad0b409
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 0x4ad0b409
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x4ad33acc]
inc dword [ebp - 0x10]
add dword [ebp - 0x38], 4
inc dword [ebp - 0x3c]
mov dword [ecx + eax], edi
cmp word [esi], 0
je 0x4ad0b45b
and word [esi], 0
inc esi
inc esi
cmp word [esi], 0
je 0x4ad0b45b
xor edi, edi
cmp word [esi], di
je 0x4ad0b43b
xor eax, eax
mov ax, word [esi]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x4ad0b43b
inc esi
inc esi
jmp 0x4ad0b41d
cmp dword [ebp - 8], edi
je 0x4ad0b52a
mov eax, dword [ebp - 0x44]
test eax, eax
mov edi, esi
jne 0x4ad12af5
cmp word [esi], 0
jne 0x4ad0b3bc
cmp dword [ebp - 0x10], 0
je 0x4ad0b481
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x40]
call fcn.4ad0ac82
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
call fcn.4ad0ac5b
and dword [ebp + 0x10], 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x2c]
jae 0x4ad0b369
cmp byte [0x4ad2fa58], 0
jne 0x4ad0b369
call fcn.4ad04321
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 0x4ad0b369
cmp eax, esi
jbe 0x4ad0b2d3
cmp word [eax - 2], 0xd
jne 0x4ad0b2d3
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 0x4ad0b2da
mov ecx, dword [ebp - 0xc]
cmp ecx, 1
jle 0x4ad0b506
mov eax, dword [ebp + 0xc]
lea eax, [eax*4 + 4]
dec ecx
mov edi, dword [0x4ad33acc]
mov dword [eax + edi], edx
add eax, 4
dec ecx
jne 0x4ad0b4f7
cmp word [esi], dx
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], edx
je 0x4ad0b481
mov eax, dword [ebp + 0xc]
shl eax, 2
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], eax
jmp 0x4ad0b41b
mov ax, word [ebp - 0x40]
cmp word [esi], ax
jne 0x4ad0b444
jmp 0x4ad0b45b
cmp ax, 0x27
je 0x4ad0ae92
and dword [ebp - 0x2c], 0
jmp 0x4ad0ae9a
inc ecx
inc ecx
mov dword [ebp - 4], ecx
mov ax, word [ecx]
test ax, ax
je 0x4ad0aebe
jmp 0x4ad0aeb4
add dword [ebp - 4], 0x10
mov dword [ebp - 0x1c], 1
jmp 0x4ad0afe5
add dword [ebp - 4], 0xe
mov dword [ebp - 0x1c], 1
jmp 0x4ad0afe5
mov eax, dword [ebp - 4]
mov ax, word [eax + 8]
add dword [ebp - 4], 0xa
mov word [ebp - 0x40], ax
jmp 0x4ad0afe5
mov eax, dword [ebp - 4]
add eax, 0xe
mov esi, eax
jmp 0x4ad12908
cmp cx, bx
je 0x4ad12913
cmp cx, 0x20
jne 0x4ad12906
cmp word [eax + 2], bx
jne 0x4ad12913
inc eax
inc eax
mov dword [ebp - 4], eax
mov cx, word [eax]
test cx, cx
jne 0x4ad128f5
push dword [ebp - 0x24]
call fcn.4ad01573
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
call fcn.4ad026a9
mov ebx, eax
mov eax, dword [ebp - 4]
sub eax, esi
sar eax, 1
push eax
push esi
push ebx
mov dword [ebp - 0x24], 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 0x4ad0afe5
add dword [ebp - 4], 2
jmp 0x4ad0afe5
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 0x4ad0afe5
push dword [ebp - 4]
push 1
push 0x234a
call fcn.4ad050c9
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4ad0b3b5
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 0x4ad0afa1
jmp 0x4ad12986
push 0
push 0x2374
call fcn.4ad050c9
pop ecx
pop ecx
call fcn.4ad1e2c8
int3
mov dword [ebp - 0x30], 0x60
mov dword [ebp - 0x34], 0x27
jmp 0x4ad0b0b1
cmp ax, word [ebp - 0x34]
je 0x4ad0b0c6
push esi
push esi
push ebx
call fcn.4ad02d3d
mov ebx, eax
mov dword [ebp - 8], ebx
jmp 0x4ad0b0c6
cmp ecx, 1
jle 0x4ad12a2e
cmp word [ebx + ecx*2 - 2], dx
jne 0x4ad12a2e
mov word [ebx + ecx*2 - 2], 0xa
inc ebx
inc ebx
dec ecx
dec ecx
lea eax, [ebx + ecx*2 + 2]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2c], eax
jmp 0x4ad0b35d
cmp ax, 0x22
jne 0x4ad12a61
inc ebx
inc ebx
dec ecx
push ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ecx
call fcn.4ad02ea5
mov dword [ebp - 4], eax
cmp word [eax], 0x22
jne 0x4ad12a61
mov word [eax], si
mov eax, dword [ebp - 4]
dec eax
dec eax
cmp eax, ebx
mov dword [ebp - 4], eax
jb 0x4ad12a61
cmp word [eax], 0x20
je 0x4ad12a4c
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 0x4ad12b57
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.4ad0206b
test eax, eax
mov dword [ebp - 0x18], eax
je 0x4ad12b72
or dword [ebp - 0x20], 0xffffffff
push 0
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 ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x4ad12ad9
and dword [ebp - 0x20], ebx
cmp dword [ebp - 0x20], esi
jne 0x4ad12b16
mov ebx, dword [ebp - 0x18]
jmp 0x4ad0b326
mov word [eax], 0xa
inc eax
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x4ad0b356
cmp dword [ebp - 0x3c], eax
jne 0x4ad0b451
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [0x4ad33acc]
inc dword [ebp - 0x10]
mov dword [eax + ecx*4], esi
jmp 0x4ad0b45b
mov ebx, dword [ebp - 8]
jmp 0x4ad0b369
push ebx
push 1
push 0x2331
jmp 0x4ad12b5f
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad050c9
push edi
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 0x10
jmp 0x4ad12b89
push dword [ebp - 8]
push 1
push 0x2374
call fcn.4ad050c9
add esp, 0xc
jmp 0x4ad12b89
push ebx
push 1
push 0x2363
call fcn.4ad050c9
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad0b3b5
push ebx
push 1
push 0x2374
call fcn.4ad050c9
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
pop eax
jmp 0x4ad0b3b5