Function at 0x401180
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0xc4
mov edi, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call edi
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x401350
mov edx, eax
lea eax, [ebp - 0x8c]
lea ebx, [ebp - 0xa4]
mov dword [esp + 0x10], 0
mov dword [ebp - 0xac], eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp], edx
mov dword [ebp - 0xb4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x16
mov dword [ebp - 0xb0], eax
call eax
mov edx, dword [ebp - 0xb4]
sub esp, 0x14
test eax, eax
je 0x401231
cmp dword [ebp - 0xa4], 0x16
je 0x401361
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], esi
call edi
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x4012c9
lea eax, [ebp - 0xa4]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xac]
mov dword [esp + 8], 0x6c
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x4012bd
cmp dword [ebp - 0xa4], 0x6c
je 0x401610
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [section..bss], 0
mov dword [esp], esi
call dword [sym.imp.gdi32.dll_GetMetaFileW]
mov dword [0x404018], eax
sub esp, 4
mov eax, dword [ebp - 0xac]
mov dword [esp + 4], eax
mov eax, dword [0x404448]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetClientRect]
mov eax, dword [ebp - 0x84]
sub eax, dword [ebp - 0x8c]
mov dword [0x404008], eax
mov eax, dword [ebp - 0x80]
sub esp, 8
sub eax, dword [ebp - 0x88]
mov dword [0x404004], eax
mov eax, dword [0x404448]
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x8c]
mov dword [ebp - 0xac], eax
jmp 0x40123d
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], edx
mov dword [ebp - 0xb4], eax
call eax
sub esp, 4
cmp dword [ebp - 0x8c], 0x9ac6cdd7
jne 0x40123d
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], esi
call edi
sub esp, 0x1c
mov edi, eax
cmp eax, 0xffffffff
je 0x4016b1
lea esi, [ebp - 0xa8]
mov dword [esp], eax
mov eax, dword [ebp - 0xb0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x16
mov dword [esp + 4], ebx
call eax
sub esp, 0x14
test eax, eax
je 0x401696
xor eax, eax
cmp dword [ebp - 0xa8], 0x16
lea edx, [ebp - 0x90]
jne 0x401696
add ebx, 2
xor ax, word [ebx - 2]
cmp ebx, edx
jne 0x401410
movzx edx, word [ebp - 0x90]
cmp ax, dx
jne 0x401650
mov eax, dword [ebp - 0xac]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xb0]
mov dword [esp + 8], 0x12
mov dword [esp], edi
call eax
sub esp, 0x14
test eax, eax
je 0x401696
cmp dword [ebp - 0xa8], 0x12
jne 0x401696
mov eax, dword [ebp - 0x86]
mov dword [esp], 0x40
add eax, eax
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GlobalAlloc]
sub esp, 8
mov dword [ebp - 0xac], eax
test eax, eax
je 0x401696
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x16
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov eax, dword [ebp - 0x86]
sub esp, 0x10
add eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xac]
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xb0]
mov dword [esp], edi
call eax
sub esp, 0x14
test eax, eax
je 0x4016b5
mov eax, dword [ebp - 0x86]
add eax, eax
cmp eax, dword [ebp - 0xa8]
jne 0x4016b5
mov dword [esp], edi
mov eax, dword [ebp - 0xb4]
call eax
mov eax, dword [ebp - 0xac]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x86]
add eax, eax
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_SetMetaFileBitsEx]
sub esp, 8
mov ebx, eax
test eax, eax
je 0x4015f4
movsx edx, word [ebp - 0x9e]
movsx eax, word [ebp - 0x9a]
sub eax, edx
movsx edx, word [ebp - 0x9c]
mov dword [0x404008], eax
movsx eax, word [ebp - 0x98]
sub eax, edx
mov dword [0x404004], eax
mov eax, dword [0x404448]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetDC]
mov esi, dword [sym.imp.gdi32.dll_GetDeviceCaps]
sub esp, 4
mov edi, eax
mov dword [esp + 4], 0x58
mov dword [esp], eax
call esi
imul eax, dword [0x404008]
movzx ecx, word [ebp - 0x96]
sub esp, 8
mov dword [esp + 4], 0x5a
cdq
mov dword [esp], edi
idiv ecx
mov dword [0x404008], eax
call esi
imul eax, dword [0x404004]
movzx ecx, word [ebp - 0x96]
sub esp, 8
mov dword [esp + 4], edi
cdq
idiv ecx
mov dword [0x404004], eax
mov eax, dword [0x404448]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ReleaseDC]
mov dword [0x404010], 0
mov dword [0x40400c], 0
sub esp, 8
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
jmp 0x4016a6
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x64]
xor edx, edx
sub esp, 4
cmp eax, 0x464d4520
sete dl
mov dword [section..bss], edx
jne 0x4012d3
mov dword [esp], esi
call dword [sym.imp.gdi32.dll_GetEnhMetaFileW]
sub esp, 4
mov dword [0x404014], eax
jmp 0x4012e4
mov esi, dword [ebp - 0xac]
movzx eax, ax
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Computed_checksum__04x___stored_checksum__04x_n
mov dword [esp], esi
call sym._sprintf.constprop.2
mov eax, dword [0x404448]
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Checksum_failed
mov dword [esp], eax
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
mov dword [esp], edi
mov eax, dword [ebp - 0xb4]
xor ebx, ebx
call eax
sub esp, 4
mov dword [0x404018], ebx
jmp 0x40131e
xor ebx, ebx
jmp 0x4016a6
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
jmp 0x401696