Function at 0x40f340
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
xor ebp, ebp
mov dword [esp + 8], 0x5a
mov dword [esp + 0xc], ebp
test ebx, ebx
jne 0x40f363
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
push esi
push edi
mov edi, dword [esp + 0x2c]
test edi, edi
je 0x40f700
mov esi, dword [esp + 0x30]
test esi, esi
je 0x40f700
push 8
push str.sha256__
push ebx
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40f545
mov eax, dword [0x445568]
cmp dword [eax + 0x5c], ebp
je 0x40f700
push 0x20
call dword [0x445554]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40f44d
mov eax, dword [0x445568]
push 0x20
push ebp
push esi
mov eax, dword [eax + 0x5c]
push edi
call eax
add esp, 0x10
test eax, eax
jne 0x40f705
mov edi, dword [esp + 0x24]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
push 0x20
push ebp
push edi
call fcn.0042aa30
push ebp
mov esi, eax
call dword [0x445558]
add esp, 0x18
test esi, esi
je 0x40f404
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push dword [esp + 0x28]
push str._t_public_key_hash:_sha256___s_n
push edi
call fcn.004119b0
mov ecx, ebx
add esp, 0xc
lea edx, [ecx + 1]
jmp 0x40f420
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f420
sub ecx, edx
lea esi, [ecx + 1]
push esi
call dword [0x445554]
mov ebp, eax
add esp, 4
mov dword [esp + 0x1c], ebp
test ebp, ebp
jne 0x40f45a
push dword [esp + 0x28]
call dword [0x445558]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x10
ret
push esi
push ebx
push ebp
call sub.MSVCRT.dll_memcpy
mov esi, ebp
add esp, 0xc
mov ebp, dword [sym.imp.MSVCRT.dll_strstr]
lea ecx, [ecx]
push str._sha256__
push esi
call ebp
mov edi, eax
add esp, 8
test edi, edi
je 0x40f484
mov byte [edi], 0
add esi, 8
mov edx, esi
lea ecx, [edx + 1]
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x40f490
mov ebx, dword [esp + 0x28]
sub edx, ecx
mov ecx, dword [esp + 0x18]
cmp ecx, edx
jne 0x40f4f3
mov edx, ebx
sub ecx, 4
jb 0x40f4c1
lea esp, [esp]
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40f4c6
add edx, 4
add esi, 4
sub ecx, 4
jae 0x40f4b0
cmp ecx, 0xfffffffc
je 0x40f53b
mov al, byte [edx]
cmp al, byte [esi]
jne 0x40f4f3
cmp ecx, 0xfffffffd
je 0x40f53b
mov al, byte [edx + 1]
cmp al, byte [esi + 1]
jne 0x40f4f3
cmp ecx, 0xfffffffe
je 0x40f53b
mov al, byte [edx + 2]
cmp al, byte [esi + 2]
jne 0x40f4f3
cmp ecx, 0xffffffff
je 0x40f53b
mov al, byte [edx + 3]
cmp al, byte [esi + 3]
je 0x40f53b
test edi, edi
je 0x40f513
push str.sha256__
push edi
mov byte [edi], 0x3b
call ebp
mov esi, eax
add esp, 8
test esi, esi
jne 0x40f470
mov ebx, dword [esp + 0x28]
push ebx
call dword [0x445558]
push dword [esp + 0x20]
mov dword [esp + 0x30], 0
call dword [0x445558]
mov eax, dword [esp + 0x18]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov dword [esp + 0x10], 0
jmp 0x40f513
push 0x43cbb8
push ebx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
je 0x40f700
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push eax
call ebx
add esp, 0xc
test eax, eax
jne 0x40f642
push dword [esp + 0x28]
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push dword [esp + 0x34]
mov dword [esp + 0x2c], eax
call ebx
add esp, 0x10
test eax, eax
jne 0x40f642
mov eax, dword [esp + 0x1c]
cmp eax, 0x100000
ja 0x40f642
cdq
push edx
push eax
call fcn.00417e20
mov ebx, eax
add esp, 8
cmp esi, ebx
ja 0x40f642
lea eax, [ebx + 1]
push eax
call dword [0x445554]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40f642
push dword [esp + 0x28]
push 1
push ebx
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x40f642
cmp esi, ebx
jne 0x40f674
mov ecx, ebp
sub esi, 4
jb 0x40f608
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x40f60d
add edi, 4
add ecx, 4
sub esi, 4
jae 0x40f5f7
cmp esi, 0xfffffffc
je 0x40f63a
mov al, byte [edi]
cmp al, byte [ecx]
jne 0x40f642
cmp esi, 0xfffffffd
je 0x40f63a
mov al, byte [edi + 1]
cmp al, byte [ecx + 1]
jne 0x40f642
cmp esi, 0xfffffffe
je 0x40f63a
mov al, byte [edi + 2]
cmp al, byte [ecx + 2]
jne 0x40f642
cmp esi, 0xffffffff
je 0x40f63a
mov al, byte [edi + 3]
cmp al, byte [ecx + 3]
jne 0x40f642
mov dword [esp + 0x10], 0
push ebp
call dword [0x445558]
push dword [esp + 0x18]
call dword [0x445558]
push dword [esp + 0x30]
mov dword [esp + 0x20], 0
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x1c]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
lea eax, [esp + 0x18]
mov byte [ebx + ebp], 0
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.00410380
add esp, 0xc
test eax, eax
jne 0x40f642
cmp esi, dword [esp + 0x18]
jne 0x40f642
mov ecx, dword [esp + 0x14]
sub esi, 4
jb 0x40f6b1
mov edi, edi
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x40f6b6
add edi, 4
add ecx, 4
sub esi, 4
jae 0x40f6a0
cmp esi, 0xfffffffc
je 0x40f63a
mov al, byte [edi]
cmp al, byte [ecx]
jne 0x40f6f3
cmp esi, 0xfffffffd
je 0x40f63a
mov al, byte [edi + 1]
cmp al, byte [ecx + 1]
jne 0x40f6f3
cmp esi, 0xfffffffe
je 0x40f63a
mov al, byte [edi + 2]
cmp al, byte [ecx + 2]
jne 0x40f6f3
cmp esi, 0xffffffff
je 0x40f63a
mov al, byte [edi + 3]
cmp al, byte [ecx + 3]
je 0x40f63a
mov dword [esp + 0x10], 0x5a
jmp 0x40f642
mov eax, 0x5a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret