Function at 0x4038f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x45]
mov byte [esp + 0x44], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x44]
push 0x100
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x44]
push 0x41019c
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x403ad4
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push ebp
call edi
push ebp
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
mov esi, eax
push 0
push ebp
mov dword [esp + 0x30], esi
call edi
lea edi, [esi + 1]
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 0x20
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
test esi, esi
rep stosb byte es:[edi], al
je 0x4039c5
mov edi, esi
mov dword [esp + 0x10], 0
jle 0x4039c5
cmp edi, 0x800
mov esi, 0x800
jg 0x4039a1
mov esi, edi
mov eax, dword [esp + 0x10]
push ebp
push 1
add eax, ebx
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x20]
sub edi, esi
add esp, 0x10
add ecx, esi
test edi, edi
mov dword [esp + 0x10], ecx
jg 0x403992
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
xor ecx, ecx
mov edi, str.___printshield__
mov dword [esp + 0x21], ecx
xor eax, eax
mov dword [esp + 0x25], ecx
add esp, 4
mov dword [esp + 0x25], ecx
xor ebp, ebp
mov dword [esp + 0x29], ecx
lea edx, [esp + 0x1c]
mov word [esp + 0x2d], cx
mov byte [esp + 0x2f], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, 0x2d
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov byte [esp + 0x1c], al
mov dword [esp + 0x31], ecx
mov byte [esp + 0x2d], al
mov dword [esp + 0x35], ecx
mov edi, str._printshield_
mov dword [esp + 0x39], ecx
xor eax, eax
mov dword [esp + 0x3d], ecx
mov word [esp + 0x41], cx
mov byte [esp + 0x43], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, 0x23
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x30], al
mov byte [esp + 0x41], al
add ecx, 0xffffffef
xor eax, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
jle 0x403aca
mov ecx, 0x12
mov esi, ebx
sub ecx, ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
mov ecx, 9
lea edi, [esp + 0x30]
xor edx, edx
repe cmpsw word [esi], word es:[edi]
je 0x403adf
mov esi, dword [esp + 0x10]
mov ecx, 9
lea edi, [esp + 0x1c]
xor edx, edx
repe cmpsw word [esi], word es:[edi]
jne 0x403ab8
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea ebp, [ecx + edx]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
inc eax
inc esi
cmp eax, ecx
mov dword [esp + 0x10], esi
jl 0x403a89
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret
test eax, eax
je 0x403aca
test ebp, ebp
je 0x403aca
sub eax, ebp
mov esi, eax
push esi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, esi
mov dword [0x410838], eax
mov edi, eax
lea edx, [ebx + ebp]
mov eax, ecx
mov esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x901
mov esi, edx
mov edi, 0x410840
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
mov ecx, dword [esp + 0x154]
mov edx, dword [esp + 0x150]
push ecx
push edx
push 0x410818
call fcn.00403310
mov eax, dword [0x410838]
push eax
call esi
add esp, 0x18
mov dword [0x410838], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret