joyce8/EMBER2024-capa huggingface dataset:
Function at 0x424a54
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x424a96
call fcn.0042a2ab
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x424a96
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x424a8d
xor eax, eax
jmp 0x424a9e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00424aa4
pop edi
pop esi
pop ebx
ret 4

Function at 0x407f80
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x6000]
push edi
or ebp, 0xffffffff
jmp 0x407fa2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407fa9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407f98
mov eax, 1
add ebx, ebx
jne 0x407fbb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407fb0
jne 0x407fcc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407fb0
xor ecx, ecx
sub eax, 3
jb 0x407fe0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x408052
mov ebp, eax
add ebx, ebx
jne 0x407feb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x407ff8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40801c
inc ecx
add ebx, ebx
jne 0x408008
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x407ffd
jne 0x408019
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407ffd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40803c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40802d
jmp 0x407f9e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40803c
add edi, ecx
jmp 0x407f9e
pop esi
mov edi, esi
mov ecx, 0x8f
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40805a
cmp byte [edi], 0
jne 0x40805a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x40805f
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x4080d7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8d64]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8ddc]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40808c
mov ecx, edi
jns 0x4080bb
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x8de4]
or eax, eax
je 0x4080d1
mov dword [ebx], eax
add ebx, 4
jmp 0x4080a9
call dword [esi + 0x8de0]
mov ebp, dword [esi + 0x8de8]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x40810b
sub esp, 0xffffff80
jmp 0x402130
Function at 0x406034
Capabilities:
Resolve function by parsing pe exports

Disassembly:
lodsd eax, dword [esi]
mov eax, dword [eax + 8]
push eax
call fcn.00403e71
sub eax, 0x8b27f10f
clc
mov eax, dword [edi + 0x3c]
mov edx, dword [edi + eax + 0x78]
add edx, edi
mov ecx, dword [edx + 0x18]
mov ebx, dword [edx + 0x20]
add ebx, edi
call fcn.00403e71
cmp eax, ebx
outsb dx, byte [esi]
stosd dword es:[edi], eax
dec ecx
mov esi, dword [ebx + ecx*4]
add esi, edi
mov eax, 0x50746547
cmp dword [esi], eax
jne 0x40605e
mov eax, 0x41636f72
cmp dword [esi + 4], eax
jne 0x40605e
call fcn.00403e71
imul ebx, dword [eax], 0x5a8bd639
and al, 3
fbld tbyte [esi - 0x75]
or al, 0x4b
mov ebx, dword [edx + 0x1c]
add ebx, edi
mov eax, dword [ebx + ecx*4]
add eax, edi
push eax
call fcn.00403e71
xor dword [eax + esi*4 + 0x875ffbf], esp
push dword [ebp + 4]
push dword [ebp]
call fcn.00404671
inc eax
add byte [esi + 0x5d], bl
ret 0x14

Function at 0x406248
Capabilities:
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x406271
mov eax, dword [0x40b058]
cmp eax, 0xffffffff
je 0x406265
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40b058], 0xffffffff
jmp 0x40631c
cmp dword [0x461530], ebx
je 0x40631c
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp word [0x46a560], bx
je 0x4062e8
cmp dword [0x40b058], 0xffffffff
jne 0x4062f1
mov esi, 0x46a560
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 4
push 0x40000000
push esi
mov dword [ebp + 8], eax
call fcn.00405fb0
mov dword [0x40b058], eax
cmp eax, 0xffffffff
je 0x40631a
cmp dword [ebp + 8], 0xffffffff
jne 0x4062dd
push ebx
lea ecx, [ebp - 4]
push ecx
push 2
lea ecx, [ebp + 8]
push ecx
push eax
mov dword [ebp + 8], 0xfeff
call edi
mov eax, dword [0x40b058]
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40b058], 0xffffffff
je 0x40631a
push 0x4096a8
mov esi, 0x461540
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp + 8]
push ecx
add eax, eax
push eax
push esi
push dword [0x40b058]
call edi
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4044fc
Capabilities:
Encode data using xor

Disassembly:
pushal
sti
inc eax
add byte [ecx - 0x40], al
inc eax
push eax
call esi
mov ecx, dword [sym.imp.KERNEL32.dll_SetStdHandle]
add esp, 0x40
add ecx, 0xffffff87
push 0x40ec93
push ecx
call esi
mov edx, dword [0x4004c8]
adc byte [esp + ebp*8 - 0x367c6a33], ch
inc eax
push edx
call esi
or al, 0xc0
inc eax
add byte [eax + 0x7c], ch
in al, dx
adc al, 0x8a
add eax, 0x40
push eax
call esi
mov edx, dword [ecx]
mov al, 0xc0
inc eax
add byte [eax + 0x40], ch
in al, dx
dec ebx
add byte [eax - 0xaebf3f], dl
salc
mov edx, dword [0x4079c8]
enter 0x4079, 0
enter 0x4079, 0
push 0x3e40eb90
xor dword [ebp + 0x40], 0x52
call esi
mov eax, dword [0xc4bbc0c8]
push 0x40eb3c
add eax, 0x40
push eax
call esi
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
sub dword [eax + 0x31], esi
inc eax
jle 0x4044aa
pop esi
xchg esi, eax
push ecx
call esi
mov edi, dword [edi]
enter 0x4021, 0
push str._____r______________Dont_exit_on_socket_receive_errors._n
or dword [eax + 0x40], 0x52
ret
Function at 0x401000
Capabilities:
Access peb ldr_data
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x403004]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.NtCreateUserProcess
push 0x40212c
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
push str.NtOpenProcess
push 0x40212c
mov ebx, eax
call edi
push eax
call esi
mov esi, dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov edi, eax
push str.__C:WindowsSystem32cmd.exe
lea eax, [esp + 0x20]
push eax
call esi
push str.C:WindowsSystem32
lea eax, [esp + 0x5c]
push eax
call esi
push str._C:WindowsSystem32cmd.exe_
lea eax, [esp + 0x54]
push eax
call esi
push 1
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x68]
mov dword [esp + 0x2c], 0
push eax
lea eax, [esp + 0x74]
push eax
push 0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.ntdll.dll_RtlCreateProcessParametersEx]
mov eax, dword fs:[0x18]
xorps xmm0, xmm0
movlpd qword [esp + 0x68], xmm0
movlpd qword [esp + 0x70], xmm0
movlpd qword [esp + 0x78], xmm0
movlpd qword [esp + 0x80], xmm0
movlpd qword [esp + 0x88], xmm0
movlpd qword [esp + 0x90], xmm0
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa0], xmm0
mov dword [esp + 0x60], 0x48
mov dword [esp + 0x64], 0
mov eax, dword [eax + 0x30]
push 0x30
push 8
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
lea eax, [esp + 0x24]
mov dword [esi], 0x24
mov dword [esi + 4], 0x20005
movzx ecx, word [esp + 0x1c]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0xc], ecx
mov dword [esp + 0x2c], 0x18
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x24], 0x1e44
mov dword [esp + 0x28], 0
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x30]
push eax
push 0x1fffff
lea eax, [esp + 0x1c]
push eax
call edi
mov dword [esi + 0x14], 0x60000
mov dword [esi + 0x18], 4
mov eax, dword [esp + 0x10]
mov dword [esi + 0x1c], eax
lea eax, [esp + 0x48]
push esi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0x1000
mov dword [esi + 0x2c], eax
lea eax, [esp + 0x64]
push eax
mov dword [esi + 0x24], 0x20010
lea eax, [esp + 0x20]
mov dword [esi + 0x28], 8
push dword [esp + 0x1c]
mov dword [esp + 0x24], 0
push 0
push 0
push 0
push 0
push 0x1fffff
push 0x1fffff
push eax
lea eax, [esp + 0x6c]
push eax
call ebx
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword fs:[0x18]
push esi
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0x14]
call dword [sym.imp.ntdll.dll_RtlDestroyProcessParameters]
mov ecx, dword [esp + 0xac]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401233
mov esp, ebp
pop ebp
ret
Function at 0x4076c4
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
xor edi, edi
mov dword [ebp - 0x210], ecx
lea eax, [ebp - 0x20c]
mov esi, edx
push edi
push eax
call fcn.004095f0
add esp, 0xc
lea ecx, [ebp - 0x20c]
call fcn.004072b0
lea eax, [ebp - 0x20c]
push eax
push edi
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov ebx, eax
test ebx, ebx
jne 0x407756
push ecx
push str.ReadSharedMemory__:
push ecx
mov edi, 0x82
mov ecx, esi
mov edx, edi
call fcn.00403b0e
lea ecx, [esi + 0x208]
mov edx, edi
push ecx
push str.Could_not_open_file_mapping_object.
push ecx
call fcn.00403b0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x410], eax
xor eax, eax
jmp 0x407820
push 0x1e78
push edi
push edi
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x4077aa
push ecx
push str.ReadSharedMemory__:
push ecx
mov edi, 0x82
mov ecx, esi
mov edx, edi
call fcn.00403b0e
lea ecx, [esi + 0x208]
mov edx, edi
push ecx
push str.Could_not_map_view_of_file.
push ecx
call fcn.00403b0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [esi + 0x410], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40774f
mov eax, dword [ebp - 0x210]
test eax, eax
jne 0x4077c6
call fcn.0040d306
mov dword [eax], 0x16
call fcn.0040d23a
jmp 0x4077d5
push 0x1034
push edi
push eax
call fcn.00408e00
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
push str.ReadSharedMemory__:
push ecx
mov edx, 0x82
mov ecx, esi
call fcn.00403b0e
lea eax, [ebp - 0x20c]
push eax
push str.succeeded._mapping_obj_name:__s
lea eax, [esi + 0x208]
push 0x104
push eax
call fcn.00406b11
and dword [esi + 0x410], 0
xor eax, eax
add esp, 0x10
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407989
leave
ret

Function at 0xff6678
Capabilities:
Encode data using xor

Disassembly:
jmp 0xff6682
pushal
call 0xff6688
pop ebp
sub ebp, 0x10
sub ebp, 0xbf6678
jmp 0xff669e
mov eax, 0xbf6678
add eax, ebp
add eax, 0x4c
mov ecx, 0x5d1
mov edx, 0xbdf93428
xor byte [eax], dl
inc eax
dec ecx
jne 0xff66b5
jmp 0xff66c8
mov dword [0x14a1a3e5], eax
sub byte [eax], ch
sub byte [ecx + 0x2828d0e9], ch
sub byte [ebx], ch
in eax, 0x90
sub al, 0x28
sub byte [eax], ch
xchg edx, eax
add byte [eax], ch
sub byte [eax], ch
invalid
Function at 0x4025d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
mov dword [esp + 0x10], eax
lea eax, [ebp - 8]
mov dword [esp + 8], eax
lea eax, [ebp - 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x10]
mov dword [esp], eax
mov dword [esp + 0xc], 0
call sub.msvcrt.dll___getmainargs
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
add eax, 1
mov dword [esp], eax
call sub.msvcrt.dll___set_app_type
mov eax, dword [ebp - 8]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00402690
mov dword [esp], eax
call sub.msvcrt.dll_exit
nop
nop
nop
nop
push ebp
mov ebp, esp
call sub.msvcrt.dll___iob_func
mov edx, dword [ebp + 8]
pop ebp
shl edx, 5
add eax, edx
ret
Function at 0x430003
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
mov eax, section..00cfg
nop
nop
nop
nop
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x430072
nop
mov ebx, 0x408ecc
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x463f50da
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
loop 0x430060
nop
nop
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
je 0x4300d2
nop
nop
nop
nop
nop
mov ebx, 0x42e1d0
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x17f651a2
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4300c0
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x401f09
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
call fcn.004013c2
push eax
lea ecx, [ebp - 4]
call fcn.004016ad
mov esi, dword [ebp - 4]
xor edx, edx
inc edx
mov ecx, 0x104
mov eax, dword [esi - 8]
sub edx, dword [esi - 4]
sub eax, ecx
or edx, eax
jge 0x401f45
push ecx
lea ecx, [ebp - 4]
call fcn.004017b8
mov esi, dword [ebp - 4]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
mov ebx, eax
lea ecx, [ebp - 4]
neg ebx
push 0xffffffffffffffff
sbb bl, bl
call fcn.00404820
add bl, 1
je 0x401f6c
mov ebx, 0x80004005
jmp 0x402019
push ecx
push ecx
lea ecx, [ebp - 4]
call fcn.00402588
push 0
push 0x5c
lea ecx, [ebp - 4]
call fcn.00402559
mov esi, dword [ebp - 4]
mov ebx, eax
mov dword [ebp - 8], ebx
cmp ebx, 0xffffffff
jne 0x401f94
mov eax, dword [esi - 0xc]
jmp 0x401f96
mov eax, ebx
push eax
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 4]
call fcn.004024d0
mov edi, dword [ebp - 0xc]
mov ecx, edi
call fcn.00407b8a
test al, al
jne 0x401fd6
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401fd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0x50
je 0x401fd3
cmp ebx, 0xb7
jne 0x401ff8
mov ebx, dword [ebp - 8]
cmp ebx, 0xffffffff
je 0x40200f
lea eax, [ebx + 1]
push eax
push 0x5c
lea ecx, [ebp - 4]
call fcn.00402559
mov ebx, eax
lea ecx, [edi - 0x10]
mov dword [ebp - 8], ebx
call fcn.004019cb
jmp 0x401f8a
test ebx, ebx
jle 0x402005
movzx ebx, bx
or ebx, 0x80070000
lea ecx, [edi - 0x10]
call fcn.004019cb
jmp 0x402019
lea ecx, [edi - 0x10]
call fcn.004019cb
xor ebx, ebx
lea ecx, [esi - 0x10]
call fcn.004019cb
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40202a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x43f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov ebx, ecx
test esi, esi
jne 0x402051
mov eax, 0x80070057
jmp 0x4020e3
push edi
mov ecx, esi
call fcn.004016d6
push 0x208
xor edi, edi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.004169c0
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push edi
push edi
push ebx
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
test edi, edi
jns 0x4020d2
movzx ecx, bl
cmp ecx, 0x26
jne 0x402096
mov edx, str.ProgramFiles
jmp 0x4020a0
cmp ecx, 0x1c
jne 0x4020c1
mov edx, str.LocalAppData
lea ecx, [ebp - 0x210]
call fcn.0040233d
push eax
mov ecx, esi
call fcn.0040165f
mov ecx, dword [ebp - 0x210]
lea ecx, [ecx - 0x10]
call fcn.004019cb
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x4020ce
xor eax, eax
inc eax
jmp 0x4020e2
mov eax, edi
jmp 0x4020e2
lea eax, [ebp - 0x20c]
mov ecx, esi
push eax
call fcn.004048eb
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041687e
mov esp, ebp
pop ebp
ret
Function at 0x402ca6
Capabilities:
Compare security identifiers

Disassembly:
push ebx
push esi
lea ebx, [ecx + 4]
push edi
mov edi, edx
test ebx, ebx
je 0x402cdd
lea esi, [edi + 4]
test esi, esi
je 0x402cdd
call fcn.00403daf
test al, al
je 0x402cdd
mov ecx, edi
call fcn.00403daf
test al, al
je 0x402cdd
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
neg eax
sbb eax, eax
neg eax
jmp 0x402cdf
xor al, al
pop edi
pop esi
pop ebx
ret

Function at 0x404675
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4046cf
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4046c1
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x4046bd
cmp esi, ecx
jae 0x4046c1
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edx, 1
jne 0x4046ab
cmp esi, ecx
jb 0x4046c5
xor eax, eax
jmp 0x4046ce
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x404f8d
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
lea eax, [ebp - 4]
mov ebx, ecx
push eax
call fcn.00405baa
mov esi, dword [ebp - 4]
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp dword [esi - 0xc], eax
je 0x40507b
push esi
push 1
push str.EnableLogging
push str.LoggingSettings
call edi
push esi
push 1
test eax, eax
push str.ShowTime
setne al
push str.LoggingSettings
mov byte [ebx + 0x7c], al
call edi
push esi
push 0
test eax, eax
push str.LogToFile
setne al
push str.LoggingSettings
mov byte [ebx + 0x7e], al
call edi
push esi
push 0
test eax, eax
push str.LogToOutputDebug
setne al
push str.LoggingSettings
mov byte [ebx + 0x7f], al
call edi
push esi
push 1
test eax, eax
push str.AppendToFile
setne al
push str.LoggingSettings
mov byte [ebx + 0x84], al
call edi
test eax, eax
lea edi, [ebx + 0x80]
mov edx, 0x104
setne al
xor ecx, ecx
mov byte [ebx + 0x85], al
inc ecx
mov eax, dword [edi]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edx
or ecx, eax
jge 0x405057
push edx
mov ecx, edi
call fcn.004017b8
mov edx, 0x104
push esi
push edx
push dword [edi]
push str.bookingDesktopAppUpdate.log
push str.LogFilePath
push str.LoggingSettings
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0xffffffffffffffff
mov ecx, edi
call fcn.00404820
jmp 0x40509e
lea ecx, [ebx + 0x80]
mov byte [ebx + 0x7c], 1
push str.bookingDesktopAppUpdate.log
mov word [ebx + 0x7e], 1
mov word [ebx + 0x84], 0x100
call fcn.004048eb
cmp byte [ebx + 0x7d], 0
je 0x4050a8
mov byte [ebx + 0x7e], 1
xor eax, eax
mov byte [ebx], 1
mov dword [ebx + 4], 7
mov dword [ebp - 4], eax
mov edx, dword [eax + 0x43f9c0]
mov ecx, dword [eax + 0x43f9c4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
test edx, edx
je 0x405116
cmp ecx, 0xa
ja 0x405116
lea eax, [ebp - 8]
mov ecx, ebx
push eax
call fcn.00405baa
mov edi, dword [ebp - 8]
cmp dword [edi - 0xc], 0
je 0x4050f9
push edi
push 1
push dword [ebp - 0xc]
push str.LoggingLevel
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
jmp 0x4050fc
xor eax, eax
inc eax
mov edx, dword [ebp - 0x10]
test eax, eax
setne cl
mov byte [ebx + edx*8], cl
lea ecx, [edi - 0x10]
mov dword [ebx + edx*8 + 4], eax
call fcn.004019cb
mov eax, dword [ebp - 4]
add eax, 8
mov dword [ebp - 4], eax
cmp eax, 0x50
jb 0x4050b7
call fcn.00407944
lea ecx, [esi - 0x10]
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], edx
call fcn.004019cb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405141
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
call fcn.004013c2
push eax
lea ecx, [ebp - 4]
call fcn.004016ad
mov esi, dword [ebp - 4]
xor ecx, ecx
inc ecx
mov edx, 0x104
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edx
or ecx, eax
jge 0x405177
push edx
lea ecx, [ebp - 4]
call fcn.004017b8
mov esi, dword [ebp - 4]
push esi
xor eax, eax
push eax
push eax
push 0x23
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x4051ad
mov ecx, dword [ebp + 8]
push 0x43baa4
call fcn.004047ee
push 0xffffffffffffffff
lea ecx, [ebp - 4]
call fcn.00404820
lea ecx, [esi - 0x10]
call fcn.004019cb
mov eax, dword [ebp + 8]
jmp 0x4051e4
push str.bookingDesktopAppUpdateLog
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x405189
push edi
lea edi, [esi - 0x10]
mov ecx, edi
call fcn.0040160c
mov esi, dword [ebp + 8]
lea ecx, [ebp - 4]
add eax, 0x10
push 0xffffffffffffffff
mov dword [esi], eax
call fcn.00404820
mov ecx, edi
call fcn.004019cb
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4052d0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, ecx
cmp byte [ebx + 0x7f], 0
je 0x40539b
cmp dword [ebx + 0xd4], 0
push esi
push edi
jne 0x405387
lea eax, [ebp - 4]
push eax
call fcn.004051eb
mov esi, dword [ebp - 4]
cmp dword [esi - 0xc], 0
je 0x40532f
lea edx, [ebp - 4]
lea ecx, [ebp - 8]
call fcn.00408204
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.00407b8a
test al, al
jne 0x405339
mov ecx, edi
call fcn.00401f09
test eax, eax
jns 0x405339
lea ecx, [edi - 0x10]
call fcn.004019cb
lea ecx, [esi - 0x10]
call fcn.004019cb
jmp 0x405399
mov al, byte [ebx + 0x85]
push 0x20
mov byte [ebp - 8], al
call fcn.00427b05
pop ecx
push dword [ebp - 8]
mov ecx, eax
push esi
call fcn.00405c1d
mov dword [ebx + 0xd4], eax
test eax, eax
jne 0x405377
push esi
push dword [ebx + 0x5c]
push str.LOG_SYSTEM:___s_:_ERROR___Cannot_create_log_writer_to__s
call fcn.00408640
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [edi - 0x10]
call fcn.004019cb
lea ecx, [esi - 0x10]
call fcn.004019cb
mov eax, dword [ebx + 0xd4]
test eax, eax
je 0x405399
push eax
mov ecx, ebx
call fcn.00405b37
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret