Function at 0x40468d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
push edi
mov dword [ebp - 0x450], ecx
cmp dword [ebp + 0xc], 0
je 0x40479d
push 0xc
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x448], eax
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 3
push eax
mov eax, dword [ebp - 0x28]
push eax
call fcn.00402650
add esp, 8
push 0x104
mov ecx, dword [ebp - 0x28]
add ecx, 4
push ecx
call fcn.00402650
add esp, 8
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov byte [ebp - 0x24], 0
xor eax, eax
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov byte [ebp - 0x1b], al
push 0
push 0
push 0
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x14
movsx ecx, byte [ebp - 0x24]
test ecx, ecx
je 0x404755
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40477e
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x450]
mov eax, dword [edx + 0x2b8]
push eax
push 0x410950
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x450]
add ecx, 0x398
call fcn.00406570
mov eax, 1
jmp 0x404b82
push 0x410958
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx + 0x174]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 0
cmp dword [ebp - 0x18], 0
jne 0x4048d6
mov byte [ebp - 0x230], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x22f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x12c], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x12b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x334], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x12c]
push eax
push 0x44
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx + 0x3a8]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x104
lea eax, [ebp - 0x334]
push eax
push 0x43
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx + 0x3a8]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x41095c
push 0x410968
lea eax, [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x230]
push ecx
call fcn.00407c9a
add esp, 0x10
mov edx, dword [ebp - 0x450]
cmp dword [edx + 0x13c], 0
je 0x4048ae
push 0x180000
lea eax, [ebp - 0x334]
push eax
lea ecx, [ebp - 0x230]
push ecx
mov ecx, dword [ebp - 0x450]
add ecx, 0x390
call fcn.0040824c
jmp 0x4048cf
push 0
lea edx, [ebp - 0x334]
push edx
lea eax, [ebp - 0x230]
push eax
mov ecx, dword [ebp - 0x450]
add ecx, 0x390
call fcn.0040824c
xor eax, eax
jmp 0x404b82
push 2
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
call fcn.00402650
add esp, 8
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_rewind]
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
push 1
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x404959
xor eax, eax
jmp 0x404b82
mov dword [ebp - 0x10], 0
jmp 0x40496b
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 8]
je 0x40498c
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
movsx ecx, byte [eax]
cmp ecx, 0xa
jne 0x40498a
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x10]
mov byte [edx], 0
jmp 0x404962
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
cmp dword [ebp - 0xc], 0
je 0x404b71
mov ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
test edx, edx
je 0x404b71
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x338], eax
mov ecx, dword [ebp - 0xc]
push ecx
push 0x41096c
call fcn.00407cff
add esp, 8
mov dword [ebp - 0x33c], eax
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
cmp eax, 0x3b
je 0x404b58
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x338]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x338]
add eax, dword [ebp - 0x33c]
mov byte [eax - 1], 0
push 0xc
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x44c], eax
mov ecx, dword [ebp - 0x44c]
mov dword [ebp - 0x340], ecx
mov edx, dword [ebp - 0x340]
mov eax, dword [ebp + 8]
mov dword [edx + 8], eax
push 0x104
mov ecx, dword [ebp - 0x340]
push ecx
call fcn.00402650
add esp, 8
push 0x104
mov edx, dword [ebp - 0x340]
add edx, 4
push edx
call fcn.00402650
add esp, 8
mov eax, dword [ebp - 0x338]
push eax
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx + 0x2b8]
push edx
push 0x410970
mov eax, dword [ebp - 0x340]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov byte [ebp - 0x444], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x443]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [ebp - 0x444]
push edx
mov ecx, dword [ebp - 0x450]
call fcn.00405db2
push 0x410978
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x404b07
mov ecx, dword [ebp - 0x338]
add ecx, dword [ebp - 0x33c]
push ecx
mov edx, dword [ebp - 0x450]
mov eax, dword [edx + 0x2b8]
push eax
push 0x410980
mov ecx, dword [ebp - 0x340]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x404b40
mov eax, dword [ebp - 0x338]
add eax, dword [ebp - 0x33c]
push eax
lea ecx, [ebp - 0x444]
push ecx
mov edx, dword [ebp - 0x450]
mov eax, dword [edx + 0x2b8]
push eax
push 0x410988
mov ecx, dword [ebp - 0x340]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
mov eax, dword [ebp - 0x340]
push eax
mov ecx, dword [ebp - 0x450]
add ecx, 0x398
call fcn.00406570
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp - 0xc]
lea eax, [edx + eax + 1]
mov dword [ebp - 0xc], eax
jmp 0x404999
lea ecx, [ebp - 4]
push ecx
call fcn.00402688
add esp, 4
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 8