Function at 0x489340
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0x5a
test ebx, ebx
jne 0x48936a
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4896dc
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4896dc
push 8
push str.sha256__
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x489532
mov eax, dword [0x5cc01c]
cmp dword [eax + 0x5c], 0
je 0x4896dc
push 0x20
call dword [section..data]
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
je 0x48944b
push 0x20
push eax
mov eax, dword [0x5cc01c]
push esi
push edi
mov eax, dword [eax + 0x5c]
call eax
add esp, 0x10
test eax, eax
jne 0x4896e1
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0xc]
push eax
push 0x20
push esi
push dword [ebp + 8]
call fcn.004a2d20
push esi
mov edi, eax
call dword [0x5cc004]
add esp, 0x18
test edi, edi
je 0x489408
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp + 0xc]
push str._t_public_key_hash:_sha256___s_n
push dword [ebp + 8]
call fcn.00490990
mov ecx, ebx
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x489420
sub ecx, edx
lea esi, [ecx + 1]
push esi
call dword [section..data]
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x489457
push dword [ebp + 0xc]
call dword [0x5cc004]
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push ebx
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov esi, edi
push str._sha256__
push esi
call sub.VCRUNTIME140.dll_strstr
mov edi, eax
add esp, 8
test edi, edi
je 0x48947b
mov byte [edi], 0
add esi, 8
mov edx, esi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x489483
mov ebx, dword [ebp + 0xc]
sub edx, ecx
mov ecx, dword [ebp - 0x14]
cmp ecx, edx
jne 0x4894e3
mov edx, ebx
sub ecx, 4
jb 0x4894b1
nop dword [eax]
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x4894b6
add edx, 4
add esi, 4
sub ecx, 4
jae 0x4894a0
cmp ecx, 0xfffffffc
je 0x489529
mov al, byte [edx]
cmp al, byte [esi]
jne 0x4894e3
cmp ecx, 0xfffffffd
je 0x489529
mov al, byte [edx + 1]
cmp al, byte [esi + 1]
jne 0x4894e3
cmp ecx, 0xfffffffe
je 0x489529
mov al, byte [edx + 2]
cmp al, byte [esi + 2]
jne 0x4894e3
cmp ecx, 0xffffffff
je 0x489529
mov al, byte [edx + 3]
cmp al, byte [esi + 3]
je 0x489529
test edi, edi
je 0x489505
push str.sha256__
push edi
mov byte [edi], 0x3b
call sub.VCRUNTIME140.dll_strstr
mov esi, eax
add esp, 8
test esi, esi
jne 0x489464
mov ebx, dword [ebp + 0xc]
push ebx
call dword [0x5cc004]
push dword [ebp - 0x10]
mov dword [ebp + 0xc], 0
call dword [0x5cc004]
mov eax, dword [ebp - 4]
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
jmp 0x489505
push 0x5687c4
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4896dc
push 2
push 0
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
jne 0x48962a
push dword [ebp - 0x10]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
push 0
push 0
push dword [ebp - 0x10]
mov ebx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0x10
test eax, eax
jne 0x48962a
cmp ebx, 0x100000
ja 0x48962a
mov eax, ebx
cdq
push edx
push eax
call fcn.00480200
mov ebx, eax
add esp, 8
cmp esi, ebx
ja 0x48962a
lea eax, [ebx + 1]
push eax
call dword [section..data]
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x48962a
push dword [ebp - 0x10]
push 1
push ebx
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, 1
jne 0x48962a
cmp esi, ebx
jne 0x489658
mov ecx, dword [ebp - 8]
sub esi, 4
jb 0x4895f1
nop dword [eax]
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x4895f6
add edi, 4
add ecx, 4
sub esi, 4
jae 0x4895e0
cmp esi, 0xfffffffc
je 0x489623
mov al, byte [edi]
cmp al, byte [ecx]
jne 0x48962a
cmp esi, 0xfffffffd
je 0x489623
mov al, byte [edi + 1]
cmp al, byte [ecx + 1]
jne 0x48962a
cmp esi, 0xfffffffe
je 0x489623
mov al, byte [edi + 2]
cmp al, byte [ecx + 2]
jne 0x48962a
cmp esi, 0xffffffff
je 0x489623
mov al, byte [edi + 3]
cmp al, byte [ecx + 3]
jne 0x48962a
mov dword [ebp - 4], 0
push dword [ebp - 8]
call dword [0x5cc004]
push dword [ebp - 0xc]
call dword [0x5cc004]
push dword [ebp - 0x10]
mov dword [ebp - 0xc], 0
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov eax, dword [ebp - 4]
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push eax
mov byte [ebx + eax], 0
call fcn.0048a270
add esp, 0xc
test eax, eax
jne 0x48962a
cmp esi, dword [ebp - 0x18]
jne 0x48962a
mov ecx, dword [ebp - 0xc]
sub esi, 4
jb 0x489692
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x489697
add edi, 4
add ecx, 4
sub esi, 4
jae 0x489681
cmp esi, 0xfffffffc
je 0x489623
mov al, byte [edi]
cmp al, byte [ecx]
jne 0x4896d0
cmp esi, 0xfffffffd
je 0x489623
mov al, byte [edi + 1]
cmp al, byte [ecx + 1]
jne 0x4896d0
cmp esi, 0xfffffffe
je 0x489623
mov al, byte [edi + 2]
cmp al, byte [ecx + 2]
jne 0x4896d0
cmp esi, 0xffffffff
je 0x489623
mov al, byte [edi + 3]
cmp al, byte [ecx + 3]
je 0x489623
mov dword [ebp - 4], 0x5a
jmp 0x48962a
mov eax, 0x5a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret