joyce8/EMBER2024-capa huggingface dataset:
Function at 0x480ab0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x4c8bb0]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00480be0
add esp, 8
cmp eax, 0xffffffff
je 0x480baf
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCR100.dll_int___cdecl__open_char_const___int__int_]
add esp, 0xc
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
je 0x480b8e
push 0x101
lea eax, [ebp - 0x148]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0xc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jle 0x480b64
lea edx, [ebp - 0x148]
push edx
call dword [sym.imp.MSVCR100.dll_atol]
add esp, 4
cmp dword [ebp + 0xc], eax
jne 0x480b40
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
jmp 0x480b62
cmp dword [0x4d33e8], 0
je 0x480b62
lea ecx, [ebp - 0x148]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push str._nverif_error_:_startpid___lu___lockpid___s_n_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 0xc
jmp 0x480b7f
cmp dword [0x4d33e8], 0
je 0x480b7f
mov eax, dword [ebp - 0x40]
push eax
push str._nread_error_:_nblu___d_n_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
jmp 0x480bad
cmp dword [0x4d33e8], 0
je 0x480bad
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x3c]
push eax
push str._nopen_error_:_handle___d___nomfic___s_n_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 0xc
jmp 0x480bca
cmp dword [0x4d33e8], 0
je 0x480bca
mov ecx, dword [ebp + 8]
push ecx
push str._nstat_error_:_nomfic___s_n_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0049f322
mov esp, ebp
pop ebp
ret
Function at 0x480c00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4c8bb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 4], eax
push 0x180
push 0x502
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_int___cdecl__open_char_const___int__int_]
add esp, 0xc
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x480c82
mov ecx, dword [ebp - 4]
push ecx
push 0x4ba5f0
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x24]
push eax
call sub.MSVCR100.dll_strlen
add esp, 4
add eax, 1
push eax
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.MSVCR100.dll__write]
add esp, 0xc
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
jmp 0x480d18
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 0x11
jne 0x480d11
push pe_nt_image_headers32
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_int___cdecl__open_char_const___int__int_]
add esp, 0xc
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x480d0f
push 0x14
push 0
lea edx, [ebp - 0x24]
push edx
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x13
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jle 0x480cec
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.MSVCR100.dll_atol]
add esp, 4
mov dword [ebp - 0xc], eax
jmp 0x480cf3
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0xc]
je 0x480d0f
mov dword [ebp - 0x28], 0xffffffff
jmp 0x480d18
mov dword [ebp - 0x28], 0xfffffffe
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049f322
mov esp, ebp
pop ebp
ret

Function at 0x481740
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push str.WNC_WNCFILES_VERBOSE
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x481779
push 0x4ba640
mov eax, dword [ebp - 4]
push eax
call sub.MSVCR100.dll_strcmp
add esp, 8
test eax, eax
je 0x481779
mov eax, 1
jmp 0x48177b
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x482260
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x48227b
xor eax, eax
jmp 0x482287
mov eax, dword [ebp - 4]
and eax, 0x10
neg eax
sbb eax, eax
neg eax
mov esp, ebp
pop ebp
ret

Function at 0x482370
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 4
test eax, eax
je 0x482394
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 0xd
je 0x482394
or eax, 0xffffffff
jmp 0x482396
xor eax, eax
pop ebp
ret
Function at 0x482620
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x4c8bb0]
xor eax, ebp
mov dword [ebp - 0x18], eax
push 0x4ba694
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x482652
mov eax, dword [ebp - 4]
jmp 0x4827d9
push str.WNCHOME_LS
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x48279d
push 0x200
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x482691
xor eax, eax
jmp 0x4827d9
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x21c], ecx
jmp 0x4826ae
mov edx, dword [ebp - 0x21c]
add edx, 1
mov dword [ebp - 0x21c], edx
mov eax, dword [ebp - 0x21c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x4826d4
mov edx, dword [ebp - 0x21c]
movsx eax, byte [edx]
cmp eax, 0x5c
jne 0x4826d2
mov ecx, dword [ebp - 0x21c]
mov byte [ecx], 0x2f
jmp 0x48269f
push 0x2f
lea edx, [ebp - 0x218]
push edx
call fcn.004815e0
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4826f5
xor eax, eax
jmp 0x4827d9
mov eax, dword [ebp - 8]
mov byte [eax], 0
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
push 0x2f
lea edx, [ebp - 0x218]
push edx
call fcn.004815e0
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x482725
xor eax, eax
jmp 0x4827d9
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
push 0x2f
lea edx, [ebp - 0x218]
push edx
call fcn.004815e0
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x482755
xor eax, eax
jmp 0x4827d9
mov eax, dword [ebp - 0x10]
mov byte [eax], 0
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
push 0x4ba6a8
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.MSVCR100.dll__stricmp]
add esp, 8
test eax, eax
jne 0x482790
push 0x4ba6ac
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.MSVCR100.dll__stricmp]
add esp, 8
test eax, eax
je 0x482794
xor eax, eax
jmp 0x4827d9
lea ecx, [ebp - 0x218]
mov dword [ebp - 4], ecx
movzx edx, byte [ebp + 8]
test edx, edx
je 0x4827d6
push str.WNCHOME
push 0x4d3428
call sub.MSVCR100.dll_strcpy
add esp, 8
mov eax, dword [ebp - 4]
push eax
push 0x4d3428
call sub.MSVCR100.dll_strcat
add esp, 8
push 0x4d3428
call dword [sym.imp.MSVCR100.dll__putenv]
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0049f322
mov esp, ebp
pop ebp
ret
Function at 0x496bf0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
push esi
mov esi, ecx
mov ebx, dword [esi + 0x28]
push edi
xor edi, edi
mov dword [esi + 0x24], edi
cmp ebx, edi
je 0x496c14
mov ecx, ebx
call fcn.004933a0
push ebx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esi + 0x28], edi
cmp dword [esi + 0x2c], edi
je 0x496c7b
xor edx, edx
cmp dword [esi + 0x14], edi
jle 0x496c67
push ebp
mov eax, dword [esi + 0x2c]
cmp dword [eax + edx*4], edi
lea ecx, [eax + edx*4]
je 0x496c60
mov eax, dword [ecx]
mov ebx, dword fs:[0x2c]
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 0x10], edi
mov dword [eax + 0xc], edi
mov dword [eax + 8], edi
mov eax, dword [0x4d3d00]
mov eax, dword [ebx + eax*4]
mov ebx, dword [ecx]
mov ebp, dword [eax + 0xa8]
mov dword [ebx + 0x10], ebp
mov ebx, dword [ecx]
mov dword [eax + 0xa8], ebx
mov dword [ecx], edi
inc edx
cmp edx, dword [esi + 0x14]
jl 0x496c21
pop ebp
mov ecx, dword [esi + 0x2c]
push ecx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esi + 0x2c], edi
mov dword [esi + 0x14], edi
mov dword [esi], edi
mov ecx, esi
call fcn.004962e0
lea ecx, [esi + 0x30]
call fcn.00491e10
pop edi
lea ecx, [esi + 0xc8]
pop esi
pop ebx
jmp fcn.00491e10

Function at 0x496ca0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4ae729
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x4c8bb0]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esp + 0x14], 1
call fcn.00496bf0
call fcn.00495d50
call fcn.00495db0
call fcn.00494b10
lea ecx, [esi + 0xc8]
mov byte [esp + 0x14], 0
call fcn.00491e10
push 0x40bc70
push 4
push 0x18
add ecx, 0x18
push ecx
call fcn.0049f52f
lea ecx, [esi + 0x30]
mov dword [esp + 0x14], 0xffffffff
call fcn.00491e10
push 0x40bc70
push 4
push 0x18
add ecx, 0x18
push ecx
call fcn.0049f52f
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret

Function at 0x4989a3
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi]
xor ebp, ebp
push edi
mov dword [esp + 0x10], ebp
cmp eax, ebp
je 0x4989bd
inc dword [esp + 0x10]
mov eax, dword [eax]
cmp eax, ebp
jne 0x4989b3
mov edi, dword [esp + 0x18]
mov ebx, dword [sym.imp.MSVCR100.dll_fwrite]
push edi
push 1
lea eax, [esi + 8]
push 4
push eax
call ebx
add esp, 0x10
cmp eax, 1
je 0x4989e7
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 4
push edi
push 1
lea ecx, [esp + 0x18]
push 4
push ecx
call ebx
add esp, 0x10
cmp eax, 1
jne 0x4989da
mov esi, dword [esi]
cmp esi, ebp
je 0x498a29
push edi
push 2
lea edx, [esi + 8]
push 0xc
push edx
call ebx
add esp, 0x10
cmp eax, 2
jne 0x498a24
mov esi, dword [esi]
test esi, esi
jne 0x498a01
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
mov ebp, 1
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x49f322
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4c8bb0]
jne 0x49f32c
repz ret
jmp fcn.0049f966
Function at 0x4a98f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0x4d40b0]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCR100.dll_strlen
add esp, 4
push eax
push 1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov esi, eax
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCR100.dll_strlen
add esp, 4
cmp esi, eax
je 0x4a994a
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0xffffffe6
jmp 0x4a9980
mov dx, word [0x4bc2d8]
mov word [ebp - 8], dx
mov al, byte [0x4bc2da]
mov byte [ebp - 6], al
mov ecx, dword [ebp - 4]
push ecx
push 2
push 1
lea edx, [ebp - 8]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 2
je 0x4a9980
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffe6
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4a9a70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0x4d40b0]
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xc]
push eax
push 1
push 1
lea ecx, [ebp - 5]
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x4a9ac5
mov edx, dword [ebp + 0x14]
mov dword [edx], 0xffffffe7
mov byte [ebp - 5], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0
jmp 0x4a9ad9
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
mov dl, byte [ebp - 5]
mov byte [ecx], dl
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 1
cmp dword [ebp - 4], ecx
jge 0x4a9af5
movsx edx, byte [ebp - 5]
cmp edx, 0xa
je 0x4a9af5
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
je 0x4a9a93
mov ecx, dword [ebp + 0x10]
sub ecx, 1
cmp dword [ebp - 4], ecx
jne 0x4a9b70
movsx edx, byte [ebp - 5]
cmp edx, 0xa
je 0x4a9b70
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffd6
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx - 1]
cmp edx, 0xa
je 0x4a9b2c
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0xa
jmp 0x4a9b35
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0xd
je 0x4a9b51
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x4a9b6b
cmp dword [ebp - 4], 0
jl 0x4a9b6b
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x4a9b35
jmp 0x4a9c07
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0xffffffe7
je 0x4a9b81
movsx eax, byte [ebp - 5]
cmp eax, 0xa
jne 0x4a9b92
cmp dword [ebp - 4], 0
jne 0x4a9b92
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0xffffffe9
jmp 0x4a9c07
mov edx, dword [ebp - 4]
sub edx, 1
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0xd
je 0x4a9bbe
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0xa
jne 0x4a9c07
cmp dword [ebp - 4], 0
jl 0x4a9c07
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x4a9bf3
cmp dword [ebp - 0x10], 0
jne 0x4a9bf1
mov dword [ebp - 0x10], 1
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x4a9c05
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 4]
mov byte [edx], 0
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 4], eax
jmp 0x4a9ba2
mov esp, ebp
pop ebp
ret
Function at 0x4acfb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x4c8bb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x320]
and ecx, 0xfffffffd
mov edx, dword [ebp + 8]
mov dword [edx + 0x320], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [str.WKNC]
mov dword [eax + 0x210], ecx
mov edx, dword [ebp + 8]
mov dword [edx + 0x214], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [eax + 0x21c], 0xa0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x220], 0
mov edx, dword [ebp + 8]
mov dword [edx + 0x224], 0
call fcn.00473400
push eax
mov eax, dword [ebp + 8]
add eax, 0x228
push eax
call sub.MSVCR100.dll_strcpy
add esp, 8
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x2a8], 1
mov edx, dword [ebp + 8]
mov byte [edx + 0x2a9], 1
mov eax, dword [ebp + 8]
mov byte [eax + 0x2aa], 0
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x2ac], 0
call fcn.00473350
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x8c], eax
mov edx, dword [ebp + 8]
mov al, byte [ebp - 0x8c]
mov byte [edx + 0x2ab], al
movsx ecx, byte [ebp - 0x8c]
test ecx, ecx
je 0x4ad0a5
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x316]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x21c]
lea eax, [eax + edx + 1]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x21c], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x21c]
add eax, 0x80
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x218], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
push 0xa0
push 1
mov ecx, dword [ebp + 8]
add ecx, 0x210
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 0xa0
je 0x4ad0eb
mov eax, 0xffffffe6
jmp 0x4ad169
mov edx, dword [ebp + 8]
movsx eax, byte [edx + 0x2ab]
test eax, eax
je 0x4ad13b
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x316]
add ecx, 1
push ecx
push 1
mov edx, dword [ebp + 8]
add edx, 0x2d0
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x316]
add edx, 1
cmp eax, edx
je 0x4ad13b
mov eax, 0xffffffe6
jmp 0x4ad169
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
push ecx
push 0x80
push 1
lea edx, [ebp - 0x88]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 0x80
je 0x4ad167
mov eax, 0xffffffe6
jmp 0x4ad169
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049f322
mov esp, ebp
pop ebp
ret
Function at 0x401150
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x412308
mov esi, ecx
push edi
push esi
call fcn.0040386c
add esp, 0xc
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
dec eax
cmp eax, 0x102
ja 0x4011c2
push str.xpsrchvw.exe
lea ecx, [ebp - 0x20c]
push ecx
push edi
push esi
call fcn.00401b50
add esp, 0x10
call fcn.00401070
test eax, eax
je 0x4011c2
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040382b
mov esp, ebp
pop ebp
ret
push 0x104
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
dec eax
cmp eax, 0x102
ja 0x40123d
push str.xpsrchvw.exe
lea eax, [ebp - 0x20c]
push eax
push edi
push esi
call fcn.00401b50
add esp, 0x10
call fcn.00401070
test eax, eax
jne 0x4011ae
push str.system32xpsrchvw.exe
lea ecx, [ebp - 0x20c]
push ecx
push edi
push esi
call fcn.00401b50
add esp, 0x10
call fcn.00401070
test eax, eax
jne 0x4011ae
push str.sysnativexpsrchvw.exe
lea edx, [ebp - 0x20c]
push edx
push edi
push esi
call fcn.00401b50
add esp, 0x10
call fcn.00401070
test eax, eax
jne 0x4011ae
push str.XPS_viewer_executable_cannot_be_found_in_system_directories.
call fcn.004029a0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0040382b
mov esp, ebp
pop ebp
ret
Function at 0x401260
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3f4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.Looking_for_XPS_print_window
call fcn.004029e0
add esp, 4
push 0
call dword [sym.imp.USER32.dll_GetTopWindow]
mov esi, eax
test esi, esi
je 0x40137a
lea eax, [ebp - 0x3f0]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ecx, dword [ebp + 8]
cmp dword [ebp - 0x3f0], ecx
jne 0x401367
push 0x1f4
lea edx, [ebp - 0x3ec]
push edx
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
push esi
call dword [sym.imp.USER32.dll_GetParent]
mov ebx, eax
lea eax, [ebp - 0x3ec]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*4 + 4]
mov dword [ebp - 0x3f4], eax
call fcn.00403840
mov ecx, dword [ebp - 0x3f4]
mov edi, esp
push 0
push 0
push ecx
push edi
push 0xffffffffffffffff
lea edx, [ebp - 0x3ec]
push edx
push 0
push 0xfde9
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, edi
mov edi, dword [sym.imp.USER32.dll_GetWindowLongW]
push eax
push 0xffffffffffffffec
push esi
call edi
push eax
push 0xfffffffffffffff0
push esi
call edi
push eax
push ebx
push esi
call dword [sym.imp.USER32.dll_IsWindowVisible]
push eax
mov eax, dword [ebp - 0x3f0]
push esi
push eax
push str.Checking_window_handle_in_process:__u_WinHandle:__u_Vis:__u_Parent:__u_Style:__u_ExStyle:__u_Text:__s
call fcn.004029e0
add esp, 0x20
test ebx, ebx
je 0x401367
lea ecx, [ebp - 0x3ec]
push str.Print
push ecx
call fcn.0040393c
add esp, 8
test eax, eax
jne 0x401393
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x401295
xor eax, eax
lea esp, [ebp - 0x400]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040382b
mov esp, ebp
pop ebp
ret
push esi
push str.Found_XPS_print_window:__u
call fcn.004029e0
add esp, 8
mov eax, 1
jmp 0x40137c
Function at 0x401b30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebp
ret

Function at 0x401c00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x104
ja 0x401c52
test eax, eax
je 0x401c52
push str.web_print
lea ecx, [ebp - 0x20c]
push ecx
push 0x104
push edi
call fcn.00401b50
add esp, 0x10
jmp 0x401c74
push str.Unable_to_determine_temp_directory.
call fcn.00402b00
push 0x412824
push 0x412308
push 0x104
push edi
call fcn.00401b50
add esp, 0x14
test edi, edi
jne 0x401c7c
xor eax, eax
jmp 0x401cb2
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax*4 + 4]
mov eax, ebx
call fcn.00403840
mov esi, esp
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
push eax
push str.Web_print_temp_directory:__s
call fcn.004029e0
push edi
call fcn.0040441a
add esp, 0xc
lea esp, [ebp - 0x218]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040382b
mov esp, ebp
pop ebp
ret
Function at 0x402810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x416fe0], 0
jne 0x402831
call fcn.004027b0
push esi
lea eax, [ebp - 0x418]
push 0x400
push eax
call fcn.00402640
add esp, 8
test eax, eax
jne 0x402881
cmp byte [ebp - 0x418], al
je 0x402881
mov ecx, dword [0x416fe0]
test ecx, ecx
je 0x4028a3
lea eax, [ebp - 0x418]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402865
push ecx
sub eax, esi
push eax
lea ecx, [ebp - 0x418]
push 1
push ecx
call fcn.0040510b
add esp, 0x10
mov ecx, dword [0x416fe0]
test ecx, ecx
je 0x4028a3
push ecx
push 1
push 1
push 0x412a4c
call fcn.0040510b
mov ecx, dword [0x416fe0]
add esp, 0x10
test edi, edi
je 0x4028d1
cmp byte [edi], 0
je 0x4028d1
test ecx, ecx
je 0x4028ed
mov eax, edi
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4028b5
push ecx
sub eax, esi
push eax
push 1
push edi
call fcn.0040510b
mov ecx, dword [0x416fe0]
add esp, 0x10
test ecx, ecx
je 0x4028ed
push ecx
push 2
push 1
push 0x412a48
call fcn.0040510b
mov ecx, dword [0x416fe0]
add esp, 0x10
test ebx, ebx
je 0x40291c
cmp byte [ebx], 0
je 0x40291c
test ecx, ecx
je 0x40291c
mov eax, ebx
lea esi, [eax + 1]
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402900
push ecx
sub eax, esi
push eax
push 1
push ebx
call fcn.0040510b
mov ecx, dword [0x416fe0]
add esp, 0x10
cmp dword [0x416fe4], 0
je 0x402968
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.___d__n
lea edx, [ebp - 0x18]
push 0x14
push edx
call fcn.00404f08
mov ecx, dword [0x416fe0]
add esp, 0x10
cmp byte [ebp - 0x18], 0
je 0x402984
test ecx, ecx
je 0x402984
lea eax, [ebp - 0x18]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402955
push ecx
sub eax, esi
push eax
push 1
lea eax, [ebp - 0x18]
push eax
jmp 0x402976
test ecx, ecx
je 0x402984
push ecx
push 1
push 1
push 0x412a3c
call fcn.0040510b
mov ecx, dword [0x416fe0]
add esp, 0x10
push ecx
call fcn.004053e2
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop esi
call fcn.0040382b
mov esp, ebp
pop ebp
ret

Function at 0x40382b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [section..data]
jne 0x403835
repz ret
jmp fcn.0040573c