joyce8/EMBER2024-capa huggingface dataset:
Function at 0x464af5
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x464c0d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x464c0d
mov eax, dword [esi + 0x3c]
push eax
call fcn.0047a485
mov esi, eax
test esi, esi
je 0x464c0d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x464c0d
mov ecx, esi
call fcn.00464a60
cmp edi, eax
jge 0x464c0d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x464b93
mov dword [esp + 0x34], 1
jmp 0x464bee
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x464c0d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.004632a0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x47ae29
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x47ae61
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00478eb6
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00478e8e
jmp 0x47ae6d
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x47c51b
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 0x47c55d
call fcn.00481fd8
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x47c55d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x47c554
xor eax, eax
jmp 0x47c565
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0047c56b
pop edi
pop esi
pop ebx
ret 4
Function at 0x482508
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x482536
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x482554
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0048246e
jmp 0x482554
mov eax, dword [esi + 0x14]
test eax, eax
je 0x482554
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0048246e
test edi, edi
mov eax, edi
jne 0x48253e
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401460
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf36b
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4e2210]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xac], ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4014ad
push 1
mov ecx, dword [ebp + 8]
push ecx
call fcn.004888b0
add esp, 8
lea ecx, [ebp - 0xa4]
call fcn.00401000
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0xa4]
call fcn.00401cd0
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x88]
call fcn.00401cd0
mov edx, dword [ebp + 0x14]
push edx
lea ecx, [ebp - 0x6c]
call fcn.00401cd0
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x34]
call fcn.00401cd0
cmp dword [ebp + 0x18], 0x4cde4c
jne 0x401512
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x50]
call fcn.00401cd0
jmp 0x40151e
mov edx, dword [ebp + 0x18]
push edx
lea ecx, [ebp - 0x50]
call fcn.00401cd0
lea eax, [ebp - 0xa4]
push eax
mov ecx, dword [ebp - 0xac]
call fcn.00401160
mov dword [ebp - 0xa8], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.00401570
mov eax, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049d270
mov esp, ebp
pop ebp
ret 0x18
Function at 0x4020d0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4be1d8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4e2210]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405a00
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40213c
mov dword [ebp - 0x18], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x18]
jmp 0x40222a
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x402211
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x402211
lea eax, [ebp - 0x14]
push eax
call fcn.00401f50
add esp, 4
lea ecx, [ebp - 0x14]
call fcn.00405df0
movzx ecx, al
test ecx, ecx
je 0x40219f
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x1c]
jmp 0x40222a
lea ecx, [ebp - 0x14]
call fcn.004683f0
push eax
call fcn.004020d0
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4021d4
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x20]
jmp 0x40222a
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x402211
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x402211
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x24]
jmp 0x40222a
mov dword [ebp - 0x28], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x402240
Capabilities:
Create process on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf338
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x4e2210]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x6c], 0
push 0x40
push 0
lea eax, [ebp - 0x68]
push eax
call fcn.0049d120
add esp, 0xc
mov dword [ebp - 0x20], 0
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x6c], 0x44
mov dword [ebp - 0x40], 0x181
lea ecx, [ebp - 0x70]
call fcn.00417fe0
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x4cdbe0
lea ecx, [ebp - 0x70]
push ecx
call fcn.00405770
add esp, 0x10
cmp dword [ebp + 0x14], 0
je 0x4022d9
mov word [ebp - 0x3c], 0xa
jmp 0x4022df
mov word [ebp - 0x3c], 0
lea ecx, [ebp - 0x70]
call fcn.004683f0
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x6c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x70]
call fcn.004683f0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x402347
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.KFunction::RunApp_CreateProcessW_error:_d__wait:_d__show:_d__path:_ws__cmd:_ws
push 0x4e77f8
call fcn.00489600
add esp, 0x1c
jmp 0x402376
cmp dword [ebp + 0x10], 0
je 0x40236f
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp + 0x18], 0
je 0x40236f
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov dword [ebp - 0x24], 1
cmp dword [ebp - 0x20], 0
je 0x40238d
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x1c], 0
je 0x4023a4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x74], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.00417fc0
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x403180
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4e2210]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x214], 0
mov eax, dword [0x4e79d0]
and eax, 1
jne 0x4031cd
mov ecx, dword [0x4e79d0]
or ecx, 1
mov dword [0x4e79d0], ecx
mov ecx, 0x4e79cc
call fcn.00417fe0
push 0x4c1b40
call fcn.0049d9e5
add esp, 4
mov ecx, 0x4e79cc
call fcn.00405df0
movzx edx, al
test edx, edx
jne 0x4031ff
push 0x4e79cc
mov ecx, dword [ebp + 8]
call fcn.004057a0
mov eax, dword [ebp - 0x214]
or eax, 1
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 8]
jmp 0x40326f
mov dword [ebp - 4], 0
push 0x104
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x403223
jmp 0x403250
lea edx, [ebp - 0x210]
push edx
mov ecx, 0x4e79cc
call fcn.004058b0
push 0x4e79cc
call fcn.00401e40
add esp, 4
push str.drivers_
mov ecx, 0x4e79cc
call fcn.00403b80
push 0x4e79cc
mov ecx, dword [ebp + 8]
call fcn.004057a0
mov eax, dword [ebp - 0x214]
or eax, 1
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0049d270
mov esp, ebp
pop ebp
ret
Function at 0x4032e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bdf9b
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x4e2210]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x10], 0
push 0
push 0x23
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x238]
call fcn.00405580
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.00405560
movzx edx, al
test edx, edx
je 0x403390
push 0x4cddc0
mov ecx, dword [ebp + 8]
call fcn.00405a00
mov eax, dword [ebp - 0x240]
or eax, 1
mov dword [ebp - 0x240], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00401df0
mov eax, dword [ebp + 8]
jmp 0x403474
lea ecx, [ebp - 0x238]
call fcn.00426b70
sub eax, 1
push eax
lea ecx, [ebp - 0x238]
call fcn.00403ec0
mov cx, word [eax]
mov word [ebp - 0x23c], cx
movzx edx, word [ebp - 0x23c]
cmp edx, 0x5c
je 0x4033dc
movzx eax, word [ebp - 0x23c]
cmp eax, 0x2f
je 0x4033dc
push 0x4cddc4
lea ecx, [ebp - 0x238]
call fcn.00403e70
push 0x4cddc8
lea ecx, [ebp - 0x238]
call fcn.00403e90
lea ecx, [ebp - 0x238]
call fcn.00401cb0
push eax
call fcn.004020d0
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40343c
push 0x4cddec
mov ecx, dword [ebp + 8]
call fcn.00405a00
mov ecx, dword [ebp - 0x240]
or ecx, 1
mov dword [ebp - 0x240], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00401df0
mov eax, dword [ebp + 8]
jmp 0x403474
lea ecx, [ebp - 0x238]
call fcn.00401cb0
push eax
mov ecx, dword [ebp + 8]
call fcn.00405a00
mov edx, dword [ebp - 0x240]
or edx, 1
mov dword [ebp - 0x240], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00401df0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0049d270
mov esp, ebp
pop ebp
ret
Function at 0x403490
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4034dd
jmp 0x403568
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.0049b68a
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x403514
jmp 0x403568
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x10]
push edx
push 0x4cddf0
mov eax, dword [ebp - 4]
push eax
call sub.VERSION.dll_VerQueryValueW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x403547
cmp dword [ebp - 8], 0
jne 0x40354b
jmp 0x403568
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0xc]
mov dword [ecx], eax
mov dword [ebp - 0x18], 1
cmp dword [ebp - 4], 0
je 0x403580
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
push edx
call fcn.0049daed
add esp, 4
mov eax, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret

Function at 0x4035b0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
and eax, 0xffff
movzx ecx, ax
and ecx, 0xff
movzx edx, cl
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
and eax, 0xffff
movzx ecx, ax
shr ecx, 8
movzx edx, cl
mov dword [ebp - 8], edx
cmp dword [ebp - 0xc], 5
jbe 0x4035f9
mov eax, 1
jmp 0x403616
cmp dword [ebp - 0xc], 5
jae 0x403605
xor eax, eax
jmp 0x403616
cmp dword [ebp - 8], 0
jbe 0x403614
mov eax, 1
jmp 0x403616
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x403620
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0xffffffff
mov ecx, dword [ebp + 0xc]
call fcn.004054f0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x403672
jmp 0x403716
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x200000
jbe 0x403694
jmp 0x403716
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x10]
add eax, 1
push eax
mov ecx, dword [ebp + 0xc]
call fcn.004052b0
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4036e0
cmp dword [ebp - 8], 0
jne 0x4036e4
jmp 0x403716
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0x20], 0
jne 0x4036b9
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x10]
mov byte [edx], 0
push 0xffffffffffffffff
mov ecx, dword [ebp + 0xc]
call fcn.00403b50
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret
Function at 0x405ec0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf2bb
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x4e2210]
xor eax, ebp
mov dword [ebp - 0x18], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x228], 0
mov word [ebp - 0x224], 0
push 0x206
push 0
lea eax, [ebp - 0x222]
push eax
call fcn.0049d120
add esp, 0xc
mov dword [ebp - 0x10], 0
push 0x104
lea ecx, [ebp - 0x224]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x224]
push edx
lea ecx, [ebp - 0x22c]
call fcn.00405a00
mov dword [ebp - 4], 0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x22c]
call fcn.004683f0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x234]
mov dword [ecx + 0x20], eax
mov edx, dword [ebp - 0x234]
cmp dword [edx + 0x20], 0xffffffff
jne 0x405fb0
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadImageToMem_CreateFile_error:_d__path:_ws
push 0x4e77f8
call fcn.00489600
add esp, 0x10
jmp 0x406018
push 0
mov ecx, dword [ebp - 0x234]
mov edx, dword [ecx + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x234]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x234]
cmp dword [edx + 8], 0x100000
jae 0x405fee
push str.the_packet_is_too_small
push 0x4e77f8
call fcn.00489600
add esp, 8
jmp 0x406018
mov eax, dword [ebp - 0x234]
cmp dword [eax + 8], 0x6400000
jbe 0x406011
push str.the_packet_is_too_large
push 0x4e77f8
call fcn.00489600
add esp, 8
jmp 0x406018
mov dword [ebp - 0x14], 1
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x230], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x22c]
call fcn.00417fc0
mov eax, dword [ebp - 0x230]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0049d270
mov esp, ebp
pop ebp
ret

Function at 0x406210
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x18], ecx
call fcn.004674e0
mov edx, dword [ebp - 8]
mov dword [edx + 0x1c], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x1c], 0
jne 0x406241
xor eax, eax
jmp 0x4062b5
mov ecx, 0x4e7528
call fcn.00426b70
test eax, eax
je 0x406268
mov ecx, dword [ebp - 8]
call fcn.00406cc0
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x28], eax
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x28]
mov dword [ebp - 4], eax
jmp 0x4062b2
push 0
push 0
mov ecx, dword [ebp - 8]
push ecx
push 0x406a90
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [ebp - 8]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x14]
push ecx
push str.LoadProductPacket_CreateThread_return:_d
push 0x4e77f8
call fcn.00489600
add esp, 0xc
mov edx, dword [ebp - 8]
cmp dword [edx + 0x14], 0
jne 0x4062ab
xor eax, eax
jmp 0x4062b5
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 4
Function at 0x406410
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf288
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x4e2210]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
call fcn.00417fe0
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp + 8]
push eax
push str.GetPacketData__d
push 0x4e77f8
call fcn.00489600
add esp, 0xc
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x34]
call fcn.004065a0
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
push str.GetPacketData_return:_d
push 0x4e77f8
call fcn.00489600
add esp, 0xc
cmp dword [ebp - 0x10], 0
jne 0x4064b4
jmp 0x406536
call fcn.004674e0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4064c4
jmp 0x406536
push str.Extract...
push 0x4e77f8
call fcn.00489600
add esp, 8
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [edx]
call ecx
mov dword [ebp - 0x24], eax
xor edx, edx
cmp dword [ebp - 0x24], 0
sete dl
push edx
push str.Extract_return:_d
push 0x4e77f8
call fcn.00489600
add esp, 0xc
cmp dword [ebp - 0x24], 0
je 0x40652f
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x2c]
jmp 0x406580
mov dword [ebp - 0x18], 1
lea ecx, [ebp - 0x14]
call fcn.00405df0
movzx eax, al
test eax, eax
jne 0x406554
lea ecx, [ebp - 0x14]
call fcn.004683f0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x20], 0
je 0x406568
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [edx + 0xc]
call ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x30], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00417fc0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 8
Function at 0x406700
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0x100000
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0xc]
cmp dword [ebp - 8], eax
jb 0x40673b
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
jmp 0x406741
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edx
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40676d
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
je 0x40678a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadMem_new_error:_d
push 0x4e77f8
call fcn.00489600
add esp, 0xc
xor eax, eax
jmp 0x4067a0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 4]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
jb 0x406725
mov eax, 1
mov esp, ebp
pop ebp
ret 0xc