Function at 0x40d8b4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
push ebx
push esi
push edi
lea edi, [ebp - 0x25]
lea esi, str.LPV2
mov ecx, 5
rep movsb byte es:[edi], byte [esi]
push 0x100
lea eax, [ebp - 0x125]
push eax
push dword [0x41fee8]
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x4216cf
lea eax, [ebp - 0x125]
push eax
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 0x18], eax
or eax, eax
jne 0x40d91e
push 0x10
push dword [0x41319c]
push dword [0x413194]
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40e106
push 0x16
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0x10], eax
or eax, eax
jne 0x40d956
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
push 0x10
push dword [0x41319c]
push dword [0x4131e4]
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40e106
mov ecx, 5
xor eax, eax
mov edi, dword [ebp - 0x10]
rep stosd dword es:[edi], eax
mov cl, 2
rep stosb byte es:[edi], al
push 0
push dword [0x42031c]
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fseek
add esp, 0xc
or eax, eax
je 0x40d9af
push 0x10
push dword [0x41319c]
push dword [0x41315c]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
push dword [ebp - 0x18]
push 1
push 0xc
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fread
add esp, 0x10
or eax, eax
jne 0x40d9f7
push 0x10
push dword [0x41319c]
push dword [0x41315c]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
push 0xc
push dword [ebp - 0x10]
lea eax, [ebp - 0xc]
push eax
call sub.CRTDLL.DLL_memcpy
inc dword [ebp - 0x25]
push 4
lea eax, [ebp - 0x25]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.CRTDLL.DLL_memcmp
add esp, 0x18
or eax, eax
je 0x40da50
push 0x10
push dword [0x41319c]
push dword [0x41315c]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
cmp word [ebp - 8], 3
je 0x40da86
push 0x10
push dword [0x41319c]
push dword [0x41320c]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 8
xor eax, eax
jmp 0x40e106
mov eax, dword [0x420318]
movsx edx, byte [ebp - 4]
and edx, 1
movsx edx, dl
mov byte [eax + 0x224], dl
movsx edx, byte [ebp - 4]
and edx, 4
movsx edx, dl
mov byte [eax + 0x225], dl
movsx edx, byte [ebp - 4]
and edx, 2
movsx edx, dl
mov byte [eax + 0x226], dl
test byte [ebp - 4], 8
je 0x40dacd
mov dword [ebp - 0x12c], 8
jmp 0x40dae1
test byte [ebp - 4], 0x10
sete al
and eax, 1
dec eax
and eax, 0x10
mov dword [ebp - 0x12c], eax
mov eax, dword [0x420318]
movsx edx, byte [ebp - 0x12c]
mov byte [eax + 0x227], dl
movsx edx, byte [ebp - 4]
and edx, 0x40
movsx edx, dl
mov byte [eax + 0x228], dl
test byte [ebp - 4], 0x80
sete al
and eax, 1
mov dword [ebp - 0x130], eax
mov eax, dword [0x420318]
movsx edx, byte [ebp - 0x130]
mov byte [eax + 0x229], dl
movsx edx, byte [ebp - 4]
and edx, 0x20
movsx edx, dl
mov byte [eax + 0x22d], dl
movsx edx, byte [ebp - 3]
and edx, 1
movsx edx, dl
mov byte [eax + 0x22a], dl
movsx edx, byte [ebp - 3]
and edx, 2
movsx edx, dl
mov byte [eax + 0x22b], dl
movsx edx, byte [ebp - 3]
and edx, 4
movsx edx, dl
mov byte [eax + 0x22c], dl
test byte [ebp - 3], 8
sete al
and eax, 1
mov dword [ebp - 0x134], eax
mov eax, dword [0x420318]
movsx edx, byte [ebp - 0x134]
mov byte [eax + 0x221], dl
test byte [ebp - 3], 0x10
sete al
and eax, 1
mov dword [ebp - 0x138], eax
mov eax, dword [0x420318]
movsx edx, byte [ebp - 0x138]
mov byte [eax + 0x22e], dl
movsx edx, byte [ebp - 3]
and edx, 0x20
movsx edx, dl
mov byte [eax + 0x22f], dl
movzx eax, word [ebp - 6]
add eax, 5
push eax
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_realloc
add esp, 8
mov dword [ebp - 0x20], eax
or eax, eax
jne 0x40dc05
push 0x10
push dword [0x41319c]
push dword [0x4131e4]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 0
push dword [0x42031c]
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fseek
push dword [ebp - 0x18]
push 1
movzx eax, word [ebp - 6]
add eax, 2
push eax
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fread
add esp, 0x1c
or eax, eax
jne 0x40dc69
push 0x10
push dword [0x41319c]
push dword [0x41315c]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
push 4
lea eax, [ebp - 0x25]
push eax
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_memcmp
add esp, 0xc
or eax, eax
je 0x40dcb0
push 0x10
push dword [0x41319c]
push dword [0x41315c]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
mov eax, dword [ebp - 0x10]
mov ebx, eax
add ebx, 0xc
movzx eax, byte [ebx]
movsx eax, ax
mov dword [ebp - 0x14], eax
push 0x100
push 0
mov eax, dword [0x420318]
add eax, 0x10
push eax
call sub.CRTDLL.DLL_memset
push dword [ebp - 0x14]
mov eax, ebx
inc eax
push eax
mov eax, dword [0x420318]
add eax, 0x10
push eax
call sub.CRTDLL.DLL_memcpy
add esp, 0x18
mov eax, dword [ebp - 0x14]
inc eax
lea ebx, [ebx + eax]
mov eax, dword [0x420318]
lea ecx, [eax + 0x10]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x40dd00
cmp eax, 0
jne 0x40dd20
push dword [0x413200]
mov eax, dword [0x420318]
add eax, 0x10
push eax
call fcn.00411ab4
movzx eax, byte [ebx]
movsx eax, ax
mov dword [ebp - 0x14], eax
push 0x100
push 0
mov eax, dword [0x420318]
add eax, 0x114
push eax
call sub.CRTDLL.DLL_memset
push dword [ebp - 0x14]
mov eax, ebx
inc eax
push eax
mov eax, dword [0x420318]
add eax, 0x114
push eax
call sub.CRTDLL.DLL_memcpy
add esp, 0x18
mov eax, dword [ebp - 0x14]
inc eax
lea ebx, [ebx + eax]
mov dword [ebp - 0x1c], ebx
mov eax, ebx
cmp word [eax], 0
jne 0x40dd87
mov eax, dword [0x420318]
mov byte [eax + 0x223], 0
mov byte [eax + 0x224], 0
add ebx, 2
jmp 0x40de2a
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
mov dword [ebp - 0x14], eax
inc eax
push eax
mov eax, dword [0x420318]
push dword [eax + 0x110]
call sub.CRTDLL.DLL_realloc
add esp, 8
mov dword [ebp - 0x20], eax
or eax, eax
jne 0x40ddde
push 0x10
push dword [0x41319c]
push dword [0x4131e4]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
mov eax, dword [0x420318]
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x110], edx
mov ecx, dword [ebp - 0x14]
inc ecx
push ecx
push 0
push dword [eax + 0x110]
call sub.CRTDLL.DLL_memset
mov eax, dword [0x420318]
mov byte [eax + 0x223], 1
push dword [ebp - 0x14]
mov ecx, ebx
add ecx, 2
push ecx
push dword [eax + 0x110]
call sub.CRTDLL.DLL_memcpy
add esp, 0x18
mov eax, dword [ebp - 0x14]
add eax, 2
lea ebx, [ebx + eax]
mov dword [ebp - 0x1c], ebx
mov eax, ebx
cmp word [eax], 0
jne 0x40de56
mov eax, dword [0x420318]
mov byte [eax + 0x21c], 0
mov eax, dword [eax + 4]
mov byte [eax], 0
mov dword [ebp - 0x14], 0
add ebx, 2
jmp 0x40dee7
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
mov dword [ebp - 0x14], eax
inc eax
push eax
mov eax, dword [0x420318]
push dword [eax + 4]
call sub.CRTDLL.DLL_realloc
add esp, 8
mov dword [ebp - 0x20], eax
or eax, eax
jne 0x40deaa
push 0x10
push dword [0x41319c]
push dword [0x4131e4]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
mov eax, dword [0x420318]
mov edx, dword [ebp - 0x20]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x14]
inc ecx
push ecx
push 0
push dword [eax + 4]
call sub.CRTDLL.DLL_memset
mov eax, dword [0x420318]
mov byte [eax + 0x21c], 1
push dword [ebp - 0x14]
mov ecx, ebx
add ecx, 4
push ecx
push dword [eax + 4]
call sub.CRTDLL.DLL_memcpy
add esp, 0x18
add ebx, 2
mov dword [ebp - 0x1c], ebx
mov eax, dword [0x420318]
mov edx, ebx
mov dx, word [edx]
mov word [eax + 0x21e], dx
add ebx, 2
mov eax, dword [ebp - 0x14]
lea ebx, [ebx + eax]
mov dword [ebp - 0x1c], ebx
mov eax, ebx
cmp word [eax], 0
jne 0x40df2a
mov eax, dword [0x420318]
mov byte [eax + 0x220], 0
add ebx, 2
mov dword [ebp - 0x14], 0
jmp 0x40dfc1
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
mov dword [ebp - 0x14], eax
inc eax
push eax
mov eax, dword [0x420318]
push dword [eax + 8]
call sub.CRTDLL.DLL_realloc
add esp, 8
mov dword [ebp - 0x20], eax
or eax, eax
jne 0x40df7e
push 0x10
push dword [0x41319c]
push dword [0x4131e4]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
mov eax, dword [0x420318]
mov edx, dword [ebp - 0x20]
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0x14]
inc ecx
push ecx
push 0
push dword [eax + 8]
call sub.CRTDLL.DLL_memset
mov eax, dword [0x420318]
mov byte [eax + 0x220], 1
push dword [ebp - 0x14]
mov ecx, ebx
add ecx, 2
push ecx
push dword [eax + 8]
call sub.CRTDLL.DLL_memcpy
add esp, 0x18
mov eax, dword [ebp - 0x14]
add eax, 2
lea ebx, [ebx + eax]
mov dword [ebp - 0x1c], ebx
mov eax, ebx
cmp word [eax], 0
jne 0x40dfe7
mov eax, dword [0x420318]
mov byte [eax + 0x222], 0
add ebx, 2
mov dword [ebp - 0x14], 0
jmp 0x40e07e
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
mov dword [ebp - 0x14], eax
inc eax
push eax
mov eax, dword [0x420318]
push dword [eax + 0xc]
call sub.CRTDLL.DLL_realloc
add esp, 8
mov dword [ebp - 0x20], eax
or eax, eax
jne 0x40e03b
push 0x10
push dword [0x41319c]
push dword [0x4131e4]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
mov eax, dword [0x420318]
mov edx, dword [ebp - 0x20]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 0x14]
inc ecx
push ecx
push 0
push dword [eax + 0xc]
call sub.CRTDLL.DLL_memset
mov eax, dword [0x420318]
mov byte [eax + 0x222], 1
push dword [ebp - 0x14]
mov ecx, ebx
add ecx, 2
push ecx
push dword [eax + 0xc]
call sub.CRTDLL.DLL_memcpy
add esp, 0x18
mov eax, dword [ebp - 0x14]
add eax, 2
lea ebx, [ebx + eax]
movzx eax, word [ebp - 6]
mov ebx, eax
add ebx, dword [ebp - 0x10]
push 2
push 0x4216cc
push ebx
call sub.CRTDLL.DLL_memcmp
add esp, 0xc
or eax, eax
je 0x40e0cd
push 0x10
mov eax, dword [0x420318]
add eax, 0x10
push eax
push dword [0x413190]
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e106
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
lea eax, [ebp - 0x125]
push eax
push dword [0x41fef8]
call fcn.00411ab4
mov eax, dword [0x42031c]
mov edx, ebx
sub edx, dword [ebp - 0x10]
add eax, edx
mov dword [0x420320], eax
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_free
add esp, 8
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret