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 ebx, [ebp - 0xb0]
lea eax, [ebp - 0x98]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x16
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 [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 dword [esp + 8], 0x6c
mov eax, dword [ebp - 0xbc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x40118d
cmp dword [ebp - 0xb0], 0x6c
je 0x4014d8
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [section..bss], 0
mov dword [esp], esi
call sym._GetMetaFileW_4
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 sym._GetClientRect_8
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 dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [0x404448]
mov dword [esp], eax
call sym._InvalidateRect_12
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], esi
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
call edi
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x40151e
lea edi, [ebp - 0xb4]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x16
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [ebp - 0xc0]
call eax
sub esp, 0x14
test eax, eax
je 0x401510
xor eax, eax
cmp dword [ebp - 0xb4], 0x16
lea edx, [ebp - 0x9c]
jne 0x401510
lea esi, [esi]
nop
xor ax, word [ebx]
add ebx, 4
xor ax, word [ebx - 2]
cmp ebx, edx
jne 0x4012f0
movzx edx, word [ebp - 0x9c]
cmp ax, dx
jne 0x401530
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x12
mov eax, dword [ebp - 0xbc]
mov dword [esp], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc0]
call eax
sub esp, 0x14
test eax, eax
je 0x401510
cmp dword [ebp - 0xb4], 0x12
jne 0x401510
mov eax, dword [ebp - 0x92]
mov dword [esp], 0x40
add eax, eax
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GlobalAlloc]
sub esp, 8
mov ebx, eax
test eax, eax
je 0x401510
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x16
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0x92]
mov dword [esp + 4], ebx
add eax, eax
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc0]
call eax
sub esp, 0x14
test eax, eax
je 0x401588
mov eax, dword [ebp - 0x92]
add eax, eax
cmp eax, dword [ebp - 0xb4]
jne 0x401588
mov dword [esp], esi
mov eax, dword [ebp - 0xc4]
call eax
sub esp, 4
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x92]
add eax, eax
mov dword [esp], eax
call sym._SetMetaFileBitsEx_8
sub esp, 8
mov esi, eax
test eax, eax
je 0x4015a7
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 sym._GetDC_4
sub esp, 4
mov edi, eax
mov dword [esp + 4], 0x58
mov dword [esp], eax
call sym._GetDeviceCaps_8
imul eax, dword [0x404008]
movzx ecx, word [ebp - 0xa2]
sub esp, 8
cdq
idiv ecx
mov dword [0x404008], eax
mov dword [esp + 4], 0x5a
mov dword [esp], edi
call sym._GetDeviceCaps_8
imul eax, dword [0x404004]
movzx ecx, word [ebp - 0xa2]
sub esp, 8
cdq
idiv ecx
mov dword [0x404004], eax
mov dword [esp + 4], edi
mov eax, dword [0x404448]
mov dword [esp], eax
call sym._ReleaseDC_8
mov dword [0x404010], 0
mov dword [0x40400c], 0
sub esp, 8
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
jmp 0x401520
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 sym._GetEnhMetaFileW_4
mov dword [0x404014], eax
sub esp, 4
jmp 0x4011b3
mov dword [esp], esi
mov eax, dword [ebp - 0xc4]
call eax
sub esp, 4
xor esi, esi
mov dword [0x404018], esi
jmp 0x4011ef
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 edi, dword [ebp - 0xbc]
mov dword [esp], edi
call sym._sprintf.constprop.0
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Checksum_failed
mov dword [esp + 4], edi
mov eax, dword [0x404448]
mov dword [esp], eax
call sym._MessageBoxA_16
sub esp, 0x10
mov dword [esp], esi
mov eax, dword [ebp - 0xc4]
call eax
sub esp, 4
jmp 0x40151e
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
mov dword [esp], esi
mov eax, dword [ebp - 0xc4]
call eax
sub esp, 4
jmp 0x40151e
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GlobalFree]
sub esp, 4
jmp 0x40151e