Function at 0x40527d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea ecx, [ebp - 0x110]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0x114], eax
jmp 0x4052c0
mov edx, dword [ebp - 0x114]
sub edx, 1
mov dword [ebp - 0x114], edx
cmp dword [ebp - 0x114], 0
jle 0x40530a
mov eax, dword [ebp - 0x114]
movsx ecx, byte [ebp + eax - 0x110]
cmp ecx, 0x2e
jne 0x405308
mov edx, dword [ebp - 0x114]
mov byte [ebp + edx - 0x10f], 0x43
mov eax, dword [ebp - 0x114]
mov byte [ebp + eax - 0x10e], 0x46
mov ecx, dword [ebp - 0x114]
mov byte [ebp + ecx - 0x10d], 0x47
jmp 0x40530a
jmp 0x4052b1
push 0x40b8f4
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x405445
mov dword [0x40c5dc], 2
mov dword [0x40c5d8], 1
mov dword [0x40c5d4], 1
mov dword [0x40c5d0], 0x80
mov dword [0x40c5cc], 1
mov dword [0x40c5c8], 1
mov byte [0x40c4c4], 0
mov dword [0x40c4c0], 1
mov dword [0x40c4bc], 1
mov dword [0x40c4b8], 0
mov dword [0x40c4b4], 1
mov dword [0x40c4b0], 0
mov dword [0x40c4ac], 0
mov dword [0x40c4a8], 0
mov dword [0x40c4a4], 1
mov dword [0x40c4a0], 1
push 0
call dword [sym.imp.USER32.dll_GetSystemMetrics]
sub eax, 0xe0
cdq
sub eax, edx
sar eax, 1
mov dword [0x40c490], eax
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
sub eax, 0x1a3
cdq
sub eax, edx
sar eax, 1
mov dword [0x40c494], eax
mov eax, dword [0x40c490]
add eax, 0xe0
mov dword [0x40c498], eax
mov ecx, dword [0x40c494]
add ecx, 0x1a3
mov dword [0x40c49c], ecx
mov dword [0x40c488], 0
mov dword [0x40c484], 0
mov dword [0x40c480], 0x10000
mov dword [0x40c47c], 0x7d0
jmp 0x4057b1
mov edx, dword [ebp - 0xc]
push edx
push 8
push 1
lea eax, [ebp - 8]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 8
je 0x405464
jmp 0x40532c
mov dword [ebp - 0x114], 0
jmp 0x40547f
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
cmp dword [ebp - 0x114], 8
jae 0x4054ad
mov edx, dword [ebp - 0x114]
xor eax, eax
mov al, byte [edx + str.pk_cfg_4]
mov ecx, dword [ebp - 0x114]
xor edx, edx
mov dl, byte [ebp + ecx - 8]
cmp eax, edx
je 0x4054ab
jmp 0x40532c
jmp 0x405470
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c5dc
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4054cd
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 4
push 1
push 0x40c5d8
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4054ed
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40550f
jmp 0x40532c
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 0x11c], ecx
cmp dword [ebp - 0x11c], 3
ja case.default.0x40552a
mov edx, dword [ebp - 0x11c]
jmp dword [edx*4 + 0x4057b5]
mov dword [0x40c5d0], 0x40
jmp case.default.0x40552a
mov dword [0x40c5d0], 0x20
jmp case.default.0x40552a
mov dword [0x40c5d0], 0x80
jmp case.default.0x40552a
mov dword [0x40c5d0], 0x100
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c488
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40557f
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 4
push 1
push 0x40c4ac
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40559f
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
push 0x40c4c0
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4055bf
jmp 0x40532c
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c4b8
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4055df
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 4
push 1
push 0x40c4b4
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4055ff
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
push 0x40c4b0
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40561f
jmp 0x40532c
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c4a8
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40563f
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 4
push 1
push 0x40c4a4
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40565f
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
push 0x40c4a0
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40567f
jmp 0x40532c
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c5d4
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40569f
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 0x10
push 1
push 0x40c490
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 0x10
je 0x4056bf
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
push 0x40c5cc
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4056df
jmp 0x40532c
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c484
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4056ff
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 4
push 1
push 0x40c480
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40571f
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
push 0x40c47c
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40573f
jmp 0x40532c
mov eax, dword [ebp - 0xc]
push eax
push 4
push 1
push 0x40c5c8
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x40575f
jmp 0x40532c
mov ecx, dword [ebp - 0xc]
push ecx
push 0x104
push 1
push 0x40c4c4
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 0x104
je 0x405784
jmp 0x40532c
mov edx, dword [ebp - 0xc]
push edx
push 4
push 1
push 0x40c4bc
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4057a4
jmp 0x40532c
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov esp, ebp
pop ebp
ret