Function at 0x4091d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x474
push ebx
mov ebx, dword [esp + 0x47c]
mov eax, 0x200
push ebp
xor ebp, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
xor eax, eax
push edi
xor edi, edi
cmp ebx, ebp
setne al
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edi
cmp eax, ebp
je 0x4095ae
push esi
lea eax, [esp + 0x1c]
push eax
push 0x14
call fcn.0040a520
xor ecx, ecx
add esp, 8
test eax, eax
setge cl
mov esi, ecx
cmp esi, ebp
je 0x409577
xor edx, edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
push ebp
mov dword [esp + 0x40], edx
push 0x80
mov byte [esp + 0x60], 0
xor eax, eax
mov dword [esp + 0x48], edx
mov ecx, 0xa
lea edi, [esp + 0x61]
rep stosd dword es:[edi], eax
push 3
mov dword [esp + 0x50], edx
push ebp
mov dword [esp + 0x58], edx
push 1
stosw word es:[edi], ax
mov dword [esp + 0x60], edx
push SysReAllocString
mov dword [esp + 0x68], edx
push ebx
stosb byte es:[edi], al
mov dword [esp + 0x48], ebp
mov dword [esp + 0x70], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov esi, eax
cmp esi, ebp
je 0x40931f
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
lea ecx, [esp + 0x14]
push ecx
mov ebp, 0x2c
push ebp
lea edx, [esp + 0x64]
push edx
push ebx
call edi
test eax, eax
je 0x4092bf
cmp dword [esp + 0x10], ebp
je 0x4092c3
xor esi, esi
jmp 0x40931f
mov eax, dword [esp + 0x60]
push 1
push 0
add eax, 0xffffffd4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
test esi, esi
je 0x40931f
push 0
lea ecx, [esp + 0x14]
push ecx
push ebp
lea edx, [esp + 0x38]
push edx
push ebx
call edi
test eax, eax
je 0x4092f6
cmp dword [esp + 0x10], ebp
je 0x4092fa
xor esi, esi
jmp 0x40931f
xor eax, eax
mov edi, 0x41fbd0
lea esi, [esp + 0x54]
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
mov edx, eax
sete dl
mov dword [esp + 0x24], 1
mov esi, edx
test esi, esi
jne 0x409339
mov edi, dword [sym.imp.msvcrt.dll_printf]
push str.Invalid_file_header_n
call edi
add esp, 4
test esi, esi
je 0x409567
jmp 0x40933f
mov edi, dword [sym.imp.msvcrt.dll_printf]
mov esi, dword [esp + 0x48c]
mov al, byte [esi]
xor ebp, ebp
test al, al
mov dword [esp + 0x28], ebp
je 0x409397
mov edi, esi
lea eax, [esp + 0x30]
push edi
push eax
call dword [sym.imp.msvcrt.dll__stricmp]
add esp, 8
test eax, eax
je 0x409389
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409370
sub eax, edx
lea ebp, [eax + ebp + 1]
mov al, byte [esi + ebp]
test al, al
lea edi, [esi + ebp]
jne 0x409354
jmp 0x409391
mov dword [esp + 0x28], 1
mov edi, dword [sym.imp.msvcrt.dll_printf]
mov esi, dword [esp + 0x28]
test esi, esi
jne 0x4093b3
lea ecx, [esp + 0x30]
push ecx
push str.Untrusted_publisher_name:__s_n
call edi
add esp, 8
jmp 0x409567
mov eax, dword [esp + 0x50]
test eax, eax
jle 0x4093df
push 0
call dword [sym.imp.msvcrt.dll_time]
mov ecx, dword [esp + 0x54]
add esp, 4
cmp ecx, eax
jge 0x4093df
push str.Signature_expired_n
call edi
add esp, 4
xor esi, esi
jmp 0x409567
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push ebx
call ebp
test eax, eax
je 0x409401
cmp dword [esp + 0x10], 4
je 0x409408
xor esi, esi
jmp 0x409567
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x90]
push eax
push ebx
call ebp
test eax, eax
je 0x40942d
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x10], eax
je 0x40943b
push str.Failed_to_read_public_key_n
xor esi, esi
call edi
jmp 0x409564
lea ecx, [esp + 0x20]
push ecx
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x8c]
push edx
push eax
push 0xd
call fcn.0040a520
xor ecx, ecx
add esp, 0x14
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x409471
push str.Failed_to_import_public_key_n
call edi
jmp 0x409564
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x24]
push eax
push ebx
call ebp
test eax, eax
je 0x40948d
cmp dword [esp + 0x10], 4
je 0x409494
xor esi, esi
jmp 0x409567
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x290]
push eax
push ebx
call ebp
test eax, eax
je 0x4094b9
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x18]
je 0x4094c7
push str.Failed_to_read_signature_n
xor esi, esi
call edi
jmp 0x409564
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
add edx, eax
lea esi, [edx + ecx + 4]
push esi
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x409513
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x409513
push eax
lea edx, [esp + 0x14]
push edx
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409513
cmp dword [esp + 0x10], esi
je 0x40952d
mov eax, dword [esp + 0x488]
push eax
push str.Failed_to_read_file__s_n
xor esi, esi
call dword [sym.imp.msvcrt.dll_printf]
add esp, 8
jmp 0x409559
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x288]
push edx
push esi
push edi
push eax
push ecx
push 0x19
call fcn.0040a520
xor edx, edx
add esp, 0x1c
test eax, eax
setge dl
mov esi, edx
test edi, edi
je 0x409567
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
cmp ebx, 0xffffffff
je 0x409573
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40958a
push eax
push 0x12
call fcn.0040a520
add esp, 8
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40959d
push eax
push 0x15
call fcn.0040a520
add esp, 8
test esi, esi
pop esi
je 0x4095ae
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x474
ret
neg edi
sbb edi, edi
and edi, 0x80000007
inc edi
mov eax, edi
pop edi
pop ebp
pop ebx
add esp, 0x474
ret