joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41a620
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
mov edx, dword [ebp + 0xc]
lea eax, [edx + 5]
push esi
cmp eax, 4
ja case.0x41a637.2
jmp dword [eax*4 + 0x41a714]
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x5c]
or dword [esi + 0x68], 4
test eax, eax
je 0x41a668
push 0xfffffffffffffff0
push eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x10000000
jne 0x41a668
mov eax, dword [esi + 0x5c]
push 8
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp + 8]
xor eax, eax
add ecx, 0xffffffc0
cmp edx, 0xfffffffc
sete al
push eax
call fcn.0041adc0
pop esi
mov esp, ebp
pop ebp
ret 0x1c
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 0x18]
lea eax, [esi + 8]
push eax
call edx
test byte [esi + 0x68], 4
je 0x41a6c8
mov eax, dword [esi + 0x5c]
and dword [esi + 0x68], 0xfffffffb
test eax, eax
je 0x41a6c8
push 0xfffffffffffffff0
push eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x10000000
je 0x41a6c8
mov eax, dword [esi + 0x5c]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, str.FAIL
test edx, edx
jle 0x41a6f5
push 0x30e
push 0x4af2b4
call fcn.00419b80
add esp, 8
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x1c
push 0x31a
push str.Unrecognized_Negative_verb_in_DoVerb__.__bad.
call fcn.00419b80
add esp, 8
mov eax, 0x80004001
pop esi
mov esp, ebp
pop ebp
ret 0x1c

Function at 0x41ff80
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x4ad9fc]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x41ff70
call fcn.0046f271
add esp, 4
call fcn.0041fe30
lea eax, [ebp - 0x18]
push eax
push 0x28
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x42000e
lea ecx, [ebp - 0x20]
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x41ffd4
mov edx, dword [ebp - 0x18]
push edx
jmp 0x420008
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
push 0
push eax
mov dword [ebp - 0x14], 1
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
call fcn.004498f0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bec1
mov esp, ebp
pop ebp
ret
Function at 0x420270
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, ebx
sub esp, 0x10
lea edx, [eax + 1]
jmp 0x420280
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x420280
push esi
push edi
sub eax, edx
lea esi, [eax + ebx]
push 0x5c
push ebx
mov dword [ebp - 4], esi
call fcn.0046f300
xor ecx, ecx
add esp, 8
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ecx
test eax, eax
jne 0x4202b0
mov dword [ebp - 0xc], ebx
jmp 0x4202b0
cmp byte [esi], 0x5c
jne 0x4202c6
inc esi
mov dword [ebp - 8], 1
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], esi
mov byte [esi], 0x5f
mov eax, dword [0x497db8]
mov dword [ecx + esi], eax
mov edx, dword [0x497dbc]
mov dword [ecx + esi + 4], edx
mov al, byte [0x497dc0]
mov byte [ecx + esi + 8], al
test ebx, ebx
je 0x42032f
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov esi, eax
test esi, esi
jle 0x42032c
lea ecx, [esi + esi + 2]
push ecx
call fcn.0046dc3d
add esp, 4
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
xor edx, edx
mov word [edi + esi*2 - 2], dx
mov esi, dword [ebp - 4]
jmp 0x420331
mov esi, dword [ebp - 4]
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
push edi
mov dword [ebp - 0x10], eax
call fcn.0046dc03
add esp, 4
cmp dword [ebp - 0x10], 0xffffffff
jne 0x42036b
mov eax, dword [ebp - 0xc]
push 0x2e
push eax
call fcn.0046ede0
add esp, 8
test eax, eax
je 0x420373
cmp eax, esi
ja 0x420373
mov ecx, dword [ebp - 8]
mov byte [eax], 0x5c
jmp 0x4202b0
pop edi
mov eax, ebx
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x46bec1
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4ad9fc]
jne 0x46becb
repz ret
jmp fcn.0047577c

Function at 0x46f050
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x46f077
call fcn.0046f7db
mov dword [eax], esi
call fcn.0046f7c8
push 0x16
pop esi
mov dword [eax], esi
call fcn.0046f2ea
mov eax, esi
jmp 0x46f0cc
test dword [ebp + 0xc], 0xfffffff9
jne 0x46f05d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x46f0a4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.0046f7ee
pop ecx
call fcn.0046f7c8
mov eax, dword [eax]
jmp 0x46f0cc
test al, 0x10
jne 0x46f0ca
test al, 1
je 0x46f0ca
test byte [ebp + 0xc], 2
je 0x46f0ca
call fcn.0046f7db
mov dword [eax], 5
call fcn.0046f7c8
mov dword [eax], 0xd
jmp 0x46f09b
xor eax, eax
pop esi
pop ebp
ret

Function at 0x47f398
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x47f3bf
call fcn.0046f7db
mov dword [eax], esi
call fcn.0046f7c8
push 0x16
pop esi
mov dword [eax], esi
call fcn.0046f2ea
mov eax, esi
jmp 0x47f414
test dword [ebp + 0xc], 0xfffffff9
jne 0x47f3a5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x47f3ec
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.0046f7ee
pop ecx
call fcn.0046f7c8
mov eax, dword [eax]
jmp 0x47f414
test al, 0x10
jne 0x47f412
test al, 1
je 0x47f412
test byte [ebp + 0xc], 2
je 0x47f412
call fcn.0046f7db
mov dword [eax], 5
call fcn.0046f7c8
mov dword [eax], 0xd
jmp 0x47f3e3
xor eax, eax
pop esi
pop ebp
ret
Function at 0x485457
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4ad9fc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00478033
and dword [ebp - 0x14], 0
cmp dword [0x4b02ec], 0
mov dword [ebp - 0x18], eax
jne 0x48550a
push 0x494bb4
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4855b2
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0x494ba8
push ebx
call edi
test eax, eax
je 0x4855b2
mov esi, dword [sym.imp.KERNEL32.DLL_EncodePointer]
push eax
call esi
push 0x494b98
push ebx
mov dword [0x4b02ec], eax
call edi
push eax
call esi
push 0x494b84
push ebx
mov dword [0x4b02f0], eax
call edi
push eax
call esi
push 0x494b68
push ebx
mov dword [0x4b02f4], eax
call edi
push eax
call esi
mov dword [0x4b02fc], eax
test eax, eax
je 0x48550a
push 0x494b50
push ebx
call edi
push eax
call esi
mov dword [0x4b02f8], eax
mov eax, dword [0x4b02f8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.DLL_DecodePointer]
cmp eax, ecx
je 0x485563
cmp dword [0x4b02fc], ecx
je 0x485563
push eax
call esi
push dword [0x4b02fc]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x485563
test ebx, ebx
je 0x485563
call edi
test eax, eax
je 0x48555a
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x48555a
test byte [ebp - 8], 1
jne 0x485563
or dword [ebp + 0x10], 0x200000
jmp 0x485596
mov eax, dword [0x4b02f0]
cmp eax, dword [ebp - 0x18]
je 0x485596
push eax
call esi
test eax, eax
je 0x485596
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x485596
mov eax, dword [0x4b02f4]
cmp eax, dword [ebp - 0x18]
je 0x485596
push eax
call esi
test eax, eax
je 0x485596
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4b02ec]
call esi
test eax, eax
je 0x4855b2
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x4855b4
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046bec1
leave
ret
Function at 0x4010b2
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x410284]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
jne 0x4010ff
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x804]
push 0x3ff
push 0x400
push eax
call fcn.0040170c
lea eax, [ebp - 0x804]
push eax
call fcn.0040170c
add esp, 0x18
push 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401ea2
leave
ret

Function at 0x40110b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x410284]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
jne 0x401158
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x404]
push 0x3ff
push 0x400
push eax
call fcn.0040170c
lea eax, [ebp - 0x404]
push eax
call fcn.0040170c
add esp, 0x18
push 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401ea2
leave
ret

Function at 0x40170c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
pushal
call 0x40171b
pop dword [ebp - 0x1c]
mov eax, 0xac3f23a9
add eax, 0x5400f372
sub dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], 0xc9f55506
sub dword [ebp - 0x2c], 0x7ba30fbb
mov dword [ebp - 0x28], 0xf16d7533
sub dword [ebp - 0x28], 0xbf3a28ee
mov dword [ebp - 0x24], 0x60f0016c
sub dword [ebp - 0x24], 0x14a3bd3e
mov dword [ebp - 0x20], 0xc0d5e2e
add dword [ebp - 0x20], 0xf3f2a1d2
lea eax, [ebp - 0x2c]
push eax
mov eax, 0xbc7856c0
add eax, 0x43c87994
add eax, dword [ebp - 0x1c]
call dword [eax]
mov dword [ebp - 0x2c], 0x9a8d1339
sub dword [ebp - 0x2c], 0x261aa9e3
mov dword [ebp - 0x28], 0x287ec83c
add dword [ebp - 0x28], 0x18ed9939
mov dword [ebp - 0x24], 0xad34cc9d
sub dword [ebp - 0x24], 0x49c56031
mov dword [ebp - 0x20], 0x633a171a
sub dword [ebp - 0x20], 0x633a171a
lea ebx, [ebp - 0x2c]
push ebx
push eax
mov eax, 0x753e9e15
add eax, 0x8b023237
add eax, dword [ebp - 0x1c]
call dword [eax]
push 0x40
push 0x1000
push 0x379aa
push 0
call eax
mov ecx, 0x6ac4a232
add ecx, 0x953b9d4b
mov esi, eax
mov edi, 0x9b9528ba
add edi, 0x64ac8746
add edi, dword [ebp - 0x1c]
mov edx, 0x159188dc
add edx, 0x32691fc
sub dword [ebp - 0x18], edx
mov ebx, dword [edi]
sub dword [ebp - 0x10], 0xf2fdea6f
sub ebx, edx
xor dword [ebp - 0xc], edi
mov dword [esi], ebx
xor dword [ebp - 8], edi
add esi, 0xa90947e2
sub esi, 0xa90947de
add edi, 4
loop 0x40183d
add eax, 0x7e353b82
add eax, 0x81cbb545
mov ebx, eax
add eax, 0xb03f4cd0
add eax, 0x4fc0b335
mov ecx, 0xbc9c5298
sub ecx, 0xbc5c5298
add ecx, dword [ebp - 0x1c]
call ebx
leave
ret

Function at 0x401ea2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x410284]
jne 0x401eac
repz ret
jmp fcn.00403e53
Function at 0x401290
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
mov ebx, 1
mov dword [esp + 0x14], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp eax, ebx
jne 0x4012e3
mov eax, dword [esp + 0x20]
sub eax, 2
je 0x4012da
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x14], 5
jb 0x4012e3
xor ebx, ebx
push 0x104
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x401346
cmp ebx, 1
je 0x40131a
push 0
push 0x23
push esi
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call fcn.00401240
add esp, 0x10
test eax, eax
jne 0x401346
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
ja 0x401346
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x405990
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
push ebx
xor ebx, ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, ebx
mov dword [0x42a9a4], ebx
mov dword [0x42a9a8], ebx
je 0x405a43
cmp byte [esi], bl
je 0x405a43
lea eax, [esp + 0x14]
push eax
push 0x20019
push ebx
push str.SOFTWAREEPSONSTM3Debug
push 0x80000002
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405a43
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0xc]
push edx
push ebx
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405a43
cmp dword [esp + 8], ebx
je 0x405a43
mov edx, dword [esp + 0x14]
push edx
mov dword [0x42a9a4], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.004057b0
add esp, 4
cmp eax, ebx
mov dword [0x42a9a8], eax
je 0x405a43
cmp dword [eax + 0x5c], ebx
je 0x405a43
pop esi
mov eax, 1
pop ebx
add esp, 8
ret
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
Function at 0x405a50
Capabilities:
Delete registry value
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
push esi
push edi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0xc]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x405aa7
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x405b37
xor eax, eax
push 0x104
mov ecx, 0x41
lea edi, [esp + 0x14]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405b0a
lea edi, [esp + 0x10]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405ae0
mov ecx, dword [0x4215e8]
mov edx, dword [0x4215ec]
mov eax, dword [0x4215f0]
mov dword [edi], ecx
mov cl, byte [0x4215f4]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov byte [edi + 0xc], cl
lea eax, [esp + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405b11
sub eax, edx
inc eax
push eax
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x14]
push edx
push 1
push 0
push str.ES_AGENT2
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x405b47
mov ecx, dword [esp + 8]
push str.ES_AGENT2
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edx, dword [esp + 8]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x405b70
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push str.SOFTWAREEPSONSTM3SIDMCommon
push 0x80000002
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405c21
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push str.AGENT2
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x10]
mov ebx, eax
neg ebx
sbb ebx, ebx
push ecx
neg ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x405c02
mov ecx, 5
mov esi, str.EPSONSTM3SIDMAGENT2
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 8]
lea edx, [esp + 0x18]
push edx
push str..mailslot_s
push eax
call fcn.0040a10d
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
jmp 0x405bef
Function at 0x405e30
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2b4
push ebx
push esi
push edi
push str.Enter_:_CallExecEpwModule
call fcn.00403ad0
mov ebx, dword [ebp + 8]
push ebx
push str.arg_:_lpszPrnName
call fcn.00403b40
mov esi, dword [ebp + 0xc]
push esi
push str.arg_:_lpszPortName
call fcn.00403b40
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x1cc]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
rep stosd dword es:[edi], eax
add esp, 0x14
lea eax, [esp + 0x120]
push eax
mov dword [esp + 0x124], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp eax, 1
jne 0x405ef3
cmp dword [esp + 0x130], 2
jne 0x405ef3
push str.OS_:_NT
call fcn.00403ad0
lea ecx, [esp + 0x14]
push ecx
push 0x104
lea edx, [esp + 0x1c4]
push edx
push esi
push ebx
call fcn.00405c30
add esp, 0x18
test eax, eax
jne 0x405f1c
push str.Cant_adjustment_target_printer.
call fcn.00403ad0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.OS_:_W9x
call fcn.00403ad0
lea edx, [esp + 0x1bc]
add esp, 4
mov ebx, 2
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405f10
jmp 0x405f20
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x1b8]
push eax
push str.szPrnInfo
call fcn.00403b40
add esp, 8
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push str.SOFTWAREEPSONSTM3SIDMCommon
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
test edi, edi
jne 0x405f88
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
push edi
push edi
push str.SIDM2
push ecx
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405fae
mov eax, dword [str.E_SDW102.DLL]
mov ecx, dword [0x421754]
mov edx, dword [0x421758]
mov dword [esp + 0x18], eax
mov al, byte [0x42175c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov byte [esp + 0x24], al
lea ecx, [esp + 0x18]
push ecx
push str.Exec_Dll_Path
call fcn.00403b40
add esp, 8
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x405eea
push str.ESM_ExecuteEpwModule
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405ffd
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x1c8]
push ecx
push ebx
call eax
add esp, 0x18
mov edi, eax
lea edx, [esp + 0x18]
push edx
push str.Done_:_Exec_Dll
call fcn.00403b40
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esp + 0x18]
push eax
push str.Free_Dll
call fcn.00403b40
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4064c0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [esp + 0x1c]
push edi
mov edi, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push ebx
mov dword [esp + 0x24], 0
call ebp
test eax, eax
je 0x406523
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x406518
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
lea ecx, [esp + 0x14]
push ecx
push esi
push edi
push ebx
call ebp
test eax, eax
jne 0x4064ef
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edx, dword [esp + 0x24]
mov dword [edx], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x406570
Capabilities:
Get session user name

Disassembly:
sub esp, 0x38
push edi
push str.Enter_:_E_IsMyPacket
call fcn.00403ad0
add esp, 4
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0xc], 0x32
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4065e9
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x4065df
push esi
lea esi, [eax + 0xe0]
push esi
push str.Packet_:_SendUser
call fcn.00403b40
lea edx, [esp + 0x14]
push edx
call fcn.0040a478
add esp, 0xc
push eax
push esi
call fcn.0040a478
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
pop esi
jne 0x4065e9
mov eax, 1
pop edi
add esp, 0x38
ret
mov eax, edi
pop edi
add esp, 0x38
ret
Function at 0x4065f0
Capabilities:
Get hostname

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
push str.Enter_:_E_GetServerMachineNameFromPortName
call fcn.00403ad0
mov ebx, dword [esp + 0x28]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 4
xor edi, edi
push ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
call ebp
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, edi
je 0x406730
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x5c
push esi
call fcn.0040a2d0
mov edi, eax
add esp, 8
test edi, edi
je 0x4066ac
push 0x5c
push esi
mov byte [edi], 0
call fcn.0040a2d0
add esp, 8
test eax, eax
je 0x40671d
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
inc eax
sub edi, eax
inc edi
cmp edi, edx
mov dword [esp + 0x10], edi
ja 0x406697
push eax
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
mov dword [esp + 0x18], 1
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push esi
mov dword [ecx], edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 0x421a3c
push ebx
call fcn.0040a300
add esp, 8
cmp eax, ebx
jne 0x40671d
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x10
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [esp + 0x10]
mov esi, eax
push ecx
push esi
mov dword [esp + 0x18], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push esi
call ebp
mov ecx, dword [esp + 0x20]
cmp eax, dword [ecx]
mov dword [esp + 0x10], eax
ja 0x40671b
mov edx, dword [esp + 0x1c]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
mov dword [esp + 0x18], 1
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [ecx], eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret