Function at 0x401050
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, 0xdc
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 0x401220
mov edx, eax
lea eax, [ebp - 0x98]
lea ebx, [ebp - 0xb0]
mov dword [esp + 0x10], 0
mov dword [ebp - 0xbc], eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp], edx
mov dword [ebp - 0xc4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x16
mov dword [ebp - 0xc0], eax
call eax
mov edx, dword [ebp - 0xc4]
sub esp, 0x14
test eax, eax
je 0x401101
cmp dword [ebp - 0xb0], 0x16
je 0x401238
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 0x401199
lea eax, [ebp - 0xb0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xbc]
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 0x40118d
cmp dword [ebp - 0xb0], 0x6c
je 0x4014f0
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 - 0xbc]
mov dword [esp + 4], eax
mov eax, dword [0x404448]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetClientRect]
mov eax, dword [ebp - 0x90]
sub eax, dword [ebp - 0x98]
mov dword [0x404008], eax
mov eax, dword [ebp - 0x8c]
sub esp, 8
sub eax, dword [ebp - 0x94]
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 - 0x98]
mov dword [ebp - 0xbc], eax
jmp 0x40110d
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], edx
mov dword [ebp - 0xc4], eax
call eax
sub esp, 4
cmp dword [ebp - 0x98], 0x9ac6cdd7
jne 0x40110d
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 0x401598
lea esi, [ebp - 0xb4]
mov dword [esp], eax
mov eax, dword [ebp - 0xc0]
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 0x401576
xor eax, eax
cmp dword [ebp - 0xb4], 0x16
lea edx, [ebp - 0x9c]
jne 0x401576
lea esi, [esi]
nop
add ebx, 2
xor ax, word [ebx - 2]
cmp ebx, edx
jne 0x4012f0
movzx edx, word [ebp - 0x9c]
cmp ax, dx
jne 0x401530
mov eax, dword [ebp - 0xbc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc0]
mov dword [esp + 8], 0x12
mov dword [esp], edi
call eax
sub esp, 0x14
test eax, eax
je 0x401576
cmp dword [ebp - 0xb4], 0x12
jne 0x401576
mov eax, dword [ebp - 0x92]
mov dword [esp], 0x40
add eax, eax
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov dword [ebp - 0xbc], eax
sub esp, 8
test eax, eax
je 0x401576
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 - 0x92]
sub esp, 0x10
add eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xbc]
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc0]
mov dword [esp], edi
call eax
sub esp, 0x14
test eax, eax
je 0x4015a0
mov eax, dword [ebp - 0x92]
add eax, eax
cmp eax, dword [ebp - 0xb4]
jne 0x4015a0
mov dword [esp], edi
mov eax, dword [ebp - 0xc4]
call eax
mov eax, dword [ebp - 0xbc]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x92]
add eax, eax
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_SetMetaFileBitsEx]
sub esp, 8
mov ebx, eax
test eax, eax
je 0x4014d4
movsx edx, word [ebp - 0xaa]
movsx eax, word [ebp - 0xa6]
sub eax, edx
movsx edx, word [ebp - 0xa8]
mov dword [0x404008], eax
movsx eax, word [ebp - 0xa4]
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 - 0xa2]
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 - 0xa2]
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 - 0xbc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
jmp 0x401586
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
xor eax, eax
sub esp, 4
cmp dword [ebp - 0x70], 0x464d4520
sete al
mov dword [section..bss], eax
jne 0x4011a3
mov dword [esp], esi
call dword [sym.imp.gdi32.dll_GetEnhMetaFileW]
mov dword [0x404014], eax
sub esp, 4
jmp 0x4011b4
mov esi, dword [ebp - 0xbc]
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.0
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 - 0xc4]
xor ebx, ebx
call eax
sub esp, 4
mov dword [0x404018], ebx
jmp 0x4011f1
xor ebx, ebx
jmp 0x401586
mov eax, dword [ebp - 0xbc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
jmp 0x401576