joyce8/EMBER2024-capa huggingface dataset:
Function at 0xb7da30
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1f1000]
push edi
or ebp, 0xffffffff
jmp 0xb7da52
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0xb7da59
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xb7da48
mov eax, 1
add ebx, ebx
jne 0xb7da6b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0xb7da7c
jne 0xb7da9b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xb7da9b
dec eax
add ebx, ebx
jne 0xb7da88
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0xb7da60
add ebx, ebx
jne 0xb7da97
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0xb7daed
xor ecx, ecx
sub eax, 3
jb 0xb7dab3
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0xb7db22
sar eax, 1
mov ebp, eax
jmp 0xb7dabe
add ebx, ebx
jne 0xb7dabe
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xb7da8c
inc ecx
add ebx, ebx
jne 0xb7dacc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0xb7da8c
add ebx, ebx
jne 0xb7dad9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0xb7dace
jne 0xb7daea
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0xb7dace
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0xb7db0c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0xb7dafe
jmp 0xb7da4e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0xb7db0c
add edi, ecx
jmp 0xb7da4e
pop esi
mov edi, esi
mov ecx, 0xc62c
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0xb7db2a
cmp byte [edi], 0x25
jne 0xb7db2a
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 0xb7db2f
lea edi, [esi + 0x72c000]
mov eax, dword [edi]
or eax, eax
je 0xb7dba7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x77ed98]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x77eed8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0xb7db5c
mov ecx, edi
jns 0xb7db8b
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 + 0x77eedc]
or eax, eax
je 0xb7dba1
mov dword [ebx], eax
add ebx, 4
jmp 0xb7db79
call dword [esi + 0x77eeec]
mov ebp, dword [esi + 0x77eee0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x23f]
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 0xb7dbdb
sub esp, 0xffffff80
jmp 0x5a5490

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x10001901
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push dword [ecx + 0xc]
and byte [ebp - 1], 0
lea esi, [ecx + 4]
mov ecx, esi
push dword [esi + 4]
call fcn.10001bb5
mov eax, dword [ebp + 8]
xor ebx, ebx
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x1000192e
mov eax, 0x100141bc
push eax
call fcn.100025cf
cmp eax, 0xffffffff
pop ecx
mov dword [ebp - 0xc], eax
je 0x100019d4
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 0x10]
push ebx
push ecx
lea ecx, [ebp - 8]
push 4
push ecx
push eax
mov dword [ebp - 8], ebx
call edi
test eax, eax
je 0x100019b3
cmp dword [ebp - 0x10], 4
jne 0x100019b3
push 0x10
lea eax, [ebp - 0x20]
push ebx
push eax
call fcn.10005860
add esp, 0xc
cmp dword [ebp - 8], 0
jle 0x100019aa
cmp dword [ebp - 0xc], 0xffffffff
je 0x100019aa
lea eax, [ebp - 0x10]
push 0
push eax
lea eax, [ebp - 0x20]
push 0x10
push eax
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x100019aa
cmp dword [ebp - 0x10], 0x10
jne 0x100019aa
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
call fcn.10001a05
inc ebx
cmp ebx, dword [ebp - 8]
jl 0x10001978
cmp ebx, dword [ebp - 8]
jne 0x100019b3
mov byte [ebp - 1], 1
lea eax, [ebp - 0xc]
push eax
call fcn.10002600
mov eax, dword [ebp + 8]
pop ecx
pop edi
mov eax, dword [eax + 4]
test eax, eax
jne 0x100019cd
mov eax, 0x100141bc
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, byte [ebp - 1]
pop esi
pop ebx
leave
ret 4

Function at 0x100030dc
Capabilities:
Hash data with md5

Disassembly:
push esi
mov esi, dword [esp + 8]
push 0x5c
push 0
push esi
call fcn.10005860
and dword [esi + 0x10], 0
and dword [esi + 0x14], 0
and dword [esi + 0x58], 0
add esp, 0xc
mov dword [esi], 0x67452301
mov dword [esi + 4], 0xefcdab89
mov dword [esi + 8], 0x98badcfe
mov dword [esi + 0xc], 0x10325476
pop esi
ret
Function at 0x401480
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401499
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4014d4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x4014d0
lea ebx, [ebx]
cmp esi, eax
jae 0x4014d4
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4014c0
cmp esi, eax
jb 0x4014da
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402320
Capabilities:
Set current directory

Disassembly:
sub esp, 0x414
mov eax, dword [0x595790]
xor eax, esp
mov dword [esp + 0x410], eax
push 0x104
lea eax, [esp + 0x20c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x218]
push eax
call fcn.005166fc
lea eax, [esp + 0x14]
add esp, 0x14
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402370
push esi
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 8]
lea esi, [ebx + 8]
push ecx
mov ecx, esi
call fcn.004019d0
lea eax, [esp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402397
sub eax, edx
push edi
sar eax, 1
push eax
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.004054e0
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea edi, [ebx + 0xc]
push esi
mov ecx, edi
call fcn.004056a0
mov eax, 0x56e68c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4023d0
sub eax, edx
sar eax, 1
push eax
push 0x56e68c
mov ecx, edi
call fcn.004054e0
push 4
push str..ini
mov ecx, edi
call fcn.004054e0
mov eax, 0x56e68c
lea edx, [eax + 2]
pop edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402403
sub eax, edx
sar eax, 1
push eax
push 0x56e68c
mov ecx, 0x59d644
call fcn.004019d0
push 8
push str._Log.txt
mov ecx, 0x59d644
call fcn.004054e0
mov eax, 0x56e68c
lea ecx, [ebx + 0x18]
lea esi, [eax + 2]
mov edi, edi
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x402440
sub eax, esi
sar eax, 1
push eax
push 0x56e68c
call fcn.004019d0
mov ecx, dword [esp + 0x414]
pop esi
xor ecx, esp
call fcn.00515ce5
add esp, 0x414
ret
Function at 0x403480
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebp
push esi
push edi
lea eax, [esp + 0x10]
push eax
push ebx
mov ebp, 2
call sub.VERSION.dll_GetFileVersionInfoSizeW
xor ecx, ecx
mov edi, eax
mov edx, ebp
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00417344
mov esi, eax
add esp, 4
test esi, esi
je 0x4034f8
push esi
push edi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x4034ef
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x10]
push ecx
push 0x56e5bc
push esi
call sub.VERSION.dll_VerQueryValueW
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
mov dword [ecx], edx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x20]
mov dword [eax], edx
xor ebp, ebp
push esi
call fcn.00417339
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
add esp, 0xc
ret 8
Function at 0x403e40
Capabilities:
Get file version info

Disassembly:
sub esp, 0x224
mov eax, dword [0x595790]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
mov ebp, dword [esp + 0x230]
xor ebx, ebx
push esi
mov esi, ecx
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
cmp ebp, ebx
je 0x403f51
push edi
push 0x56e530
push ebp
call fcn.00516767
add esp, 8
lea eax, [esp + 0x2c]
push eax
push esi
mov dword [esp + 0x20], 2
call sub.VERSION.dll_GetFileVersionInfoSizeW
xor ecx, ecx
mov edi, eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00417344
mov esi, eax
add esp, 4
test esi, esi
je 0x403f1d
mov eax, dword [esp + 0x10]
push esi
push edi
push ebx
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x403ef3
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x24]
push edx
push 0x56e5bc
push esi
call sub.VERSION.dll_VerQueryValueW
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 8]
mov edi, dword [eax + 0xc]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x18], ebx
jmp 0x403ef7
mov edi, dword [esp + 0x24]
push esi
call fcn.00417339
add esp, 4
cmp dword [esp + 0x18], ebx
jne 0x403f1d
mov eax, dword [esp + 0x28]
mov ebx, eax
movzx edx, ax
shr ebx, 0x10
shr edi, 0x10
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], edi
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x34]
push eax
push 0
push 0
push ecx
call fcn.005166fc
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
push edx
push eax
push ebx
lea ecx, [esp + 0x50]
push ecx
push str._s_Ver._d._d_d
push ebp
call fcn.00516767
add esp, 0x2c
pop edi
mov ecx, dword [esp + 0x22c]
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00515ce5
add esp, 0x224
ret 4
Function at 0x408500
Capabilities:
Terminate thread

Disassembly:
cmp dword [esi + 0x51c], 0
je 0x408572
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push edi
xor edi, edi
lea ebx, [ebx]
mov eax, dword [esi + 0x51c]
push 0
push eax
call ebx
test eax, eax
je 0x40853b
push 0x32
call ebp
inc edi
cmp edi, 0x64
jl 0x408520
jmp 0x408552
mov ecx, dword [esi + 0x51c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x51c], 0
mov eax, dword [esi + 0x51c]
pop edi
pop ebp
pop ebx
test eax, eax
je 0x408572
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x51c], 0
mov eax, dword [esi + 0x520]
test eax, eax
je 0x40858d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x520], 0
mov byte [esi + 0x518], 0
ret
Function at 0x409600
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x654
mov eax, dword [0x595790]
xor eax, esp
mov dword [esp + 0x64c], eax
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov edi, dword [esi + 0x3b4]
mov eax, dword [edi + 0xf4]
push eax
push 0x1f4
lea ecx, [esp + 0x270]
push ecx
push 0x56e530
push str.LastConfig
push 0x56ecd4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x409700
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [esp + 0x268]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409676
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x26c]
push ecx
lea ecx, [edi + 0x254]
call fcn.004019d0
mov edi, dword [esi + 0x3b4]
mov ecx, dword [edi + 0x200]
mov edx, dword [ecx]
mov eax, dword [edi + 0x254]
mov edx, dword [edx + 0xc]
push eax
call edx
mov ecx, dword [edi + 0x200]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
call edx
push 0
push 0x56e530
lea ecx, [esi + 0x538]
call fcn.004019d0
push 0
push 0x56e530
lea ecx, [esi + 0x53c]
call fcn.004019d0
push 0
push 0x56e530
lea ecx, [esi + 0x540]
call fcn.004019d0
call fcn.00409490
jmp 0x4097cd
mov ecx, dword [edi + 0x1fc]
lea ebx, [edi + 0x254]
mov edi, dword [ebx]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x409762
cmp dword [edi + 0xc], 0
lea ebp, [edi + 0xc]
jl 0x409756
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x409756
push eax
call fcn.00405630
mov dword [esp + 0x18], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebp], eax
dec eax
test eax, eax
jg 0x40974b
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [esp + 0x14]
add ecx, 0x10
mov dword [ebx], ecx
jmp 0x409762
mov edx, dword [ecx - 0xc]
push edx
push ecx
mov ecx, ebx
call fcn.004019d0
push 0xf
push str._BootNCCtrl.ini
mov ecx, ebx
call fcn.004054e0
mov edi, dword [esi + 0x3b4]
mov ecx, dword [edi + 0x200]
mov eax, dword [ecx]
mov edx, dword [edi + 0x254]
mov eax, dword [eax + 0xc]
push edx
call eax
mov ecx, dword [edi + 0x200]
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
call eax
push 0
push 0x56e530
lea ecx, [esi + 0x538]
call fcn.004019d0
push 0
push 0x56e530
lea ecx, [esi + 0x53c]
call fcn.004019d0
push 0
push 0x56e530
lea ecx, [esi + 0x540]
call fcn.004019d0
push 0
push 0
mov eax, esi
call fcn.004076d0
mov ecx, dword [esp + 0x65c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00515ce5
add esp, 0x654
ret
Function at 0x414cb0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x210
mov eax, dword [0x595790]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push esi
mov esi, ecx
mov ebx, dword [esi + 4]
mov eax, 1
test ebx, ebx
je 0x414d8e
test edi, edi
je 0x414d8e
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
push eax
mov eax, dword [esi + 8]
push 0x104
lea ecx, [esp + 0x10]
push ecx
push 0x56ecfc
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, 0x56ecfc
lea eax, [esp + 8]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x414d36
test dx, dx
je 0x414d32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x414d36
add eax, 4
add ecx, 4
test dx, dx
jne 0x414d10
xor eax, eax
jmp 0x414d3b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x414d5a
mov eax, edi
add esi, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x414d47
sub eax, edx
sar eax, 1
push eax
push edi
jmp 0x414d79
lea eax, [esp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x414d61
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xc]
add esi, 0x14
push ecx
mov ecx, esi
call fcn.004019d0
mov esi, dword [esi]
mov ecx, ebx
call fcn.0042ebb7
mov dword [eax + 0x2c], esi
xor eax, eax
mov ecx, dword [esp + 0x214]
pop esi
pop ebx
xor ecx, esp
call fcn.00515ce5
add esp, 0x210
ret
Function at 0x415280
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x28
push ebx
push esi
push edi
push str.kernel32.dll
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.GetNativeSystemInfo
push esi
call ebx
test eax, eax
je 0x4152b6
lea ecx, [esp + 0x10]
push ecx
call eax
jmp 0x4152c1
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ax, word [esp + 0x10]
cmp ax, 9
jne 0x4152d3
mov edi, 0x40
jmp 0x4152e1
xor ecx, ecx
test ax, ax
setne cl
dec ecx
and ecx, 0x20
mov edi, ecx
push str.IsWow64Process
push esi
call ebx
mov esi, eax
test esi, esi
je 0x4152fd
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test edi, edi
jne 0x41530a
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28
ret
cmp dword [esp + 0xc], 0
je 0x41531d
pop edi
pop esi
mov eax, 2
pop ebx
add esp, 0x28
ret
xor eax, eax
cmp edi, 0x40
sete al
pop edi
pop esi
pop ebx
lea eax, [eax + eax + 1]
add esp, 0x28
ret
Function at 0x4163f0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x3f0
mov eax, dword [0x595790]
xor eax, esp
mov dword [esp + 0x3ec], eax
mov ecx, dword [0x59d924]
mov eax, dword [esp + 0x3f4]
push ebx
push ebp
mov ebp, dword [ecx + 4]
push esi
mov esi, dword [eax + 0x30]
push edi
mov edi, dword [eax + 0x2c]
push 0x12
push 0x572d14
mov ecx, 0x59d940
xor bl, bl
mov dword [0x59d5dc], eax
call fcn.004019d0
push 0
push 0x56e530
mov ecx, 0x59d934
mov dword [0x59d92c], 0
mov dword [0x59d930], 0xffffffff
call fcn.004019d0
push 0
push 0x56e530
mov ecx, 0x59d938
call fcn.004019d0
push 0
push 0x56e530
mov ecx, 0x59d93c
call fcn.004019d0
push edi
call sub.CommUtyFx.dll__CommUtyFxInitW_4
push edi
push 0x1f4
lea eax, [esp + 0x18]
push eax
push str.No_settings
push str.COM_Port_Name
xor edx, edx
push esi
mov word [esp + 0x28], dx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [esp + 0x10], 0
je 0x4164e8
mov ecx, str.No_settings
lea eax, [esp + 0x10]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4164dd
test dx, dx
je 0x4164d9
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4164dd
add eax, 4
add ecx, 4
test dx, dx
jne 0x4164b7
xor eax, eax
jmp 0x4164e2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4164e8
mov bl, 1
lea ecx, [esp + 0x10]
push ecx
call sub.CommUtyFx.dll__CommUtyFxGetIndexW_4
mov esi, eax
mov dword [0x59d930], esi
cmp esi, 0xffffffff
jne 0x416527
push 0xb
push str.No_settings
mov ecx, 0x59d934
call fcn.004019d0
test bl, bl
je 0x41654f
mov edx, dword [ebp]
mov eax, dword [edx + 4]
push 1
push str.COMport_Lost.
mov ecx, ebp
call eax
jmp 0x41654f
lea eax, [esp + 0x10]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x416530
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x14]
push ecx
mov ecx, 0x59d934
call fcn.004019d0
mov edx, dword [0x59d934]
push 0x59d994
push edx
push edi
call sub.CommUtyFx.dll__CommUtyFxLoadCOMportParaW_12
push esi
call sub.CommUtyFx.dll__CommUtyFxGetFileNameW_4
test eax, eax
jne 0x41656f
xor ecx, ecx
jmp 0x416583
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x416574
sub ecx, esi
sar ecx, 1
push ecx
push eax
mov ecx, 0x59d938
call fcn.004019d0
push 0x59d934
mov ecx, 0x59d93c
call fcn.004056a0
push edi
push 0
push str.DTR_Control
push 0x572d14
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [esp + 0x3fc]
pop edi
neg eax
sbb eax, eax
pop esi
neg eax
pop ebp
pop ebx
mov dword [0x59d9cc], eax
xor ecx, esp
mov eax, 0x59d604
call fcn.00515ce5
add esp, 0x3f0
ret
Function at 0x416f10
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 8], 0
je 0x416fe0
cmp dword [esi + 0xbc], 0
je 0x416f35
mov eax, dword [esi + 0x80]
push 6
push eax
call dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
mov ecx, dword [esi + 0x3c]
push ebx
push ebp
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov edx, dword [esi + 0x38]
push 0
push edx
call ebp
test eax, eax
je 0x416f6a
push 0x32
call ebx
inc edi
cmp edi, 0x64
jl 0x416f50
xor ebx, ebx
jmp 0x416f79
mov eax, dword [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov dword [esi + 0x38], ebx
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x416f8c
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x38], ebx
mov ecx, dword [esi + 0xd0]
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push ecx
call edi
mov edx, dword [esi + 0xe4]
push edx
call edi
mov eax, dword [esi + 0x3c]
push eax
call edi
mov ecx, dword [esi + 0x80]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetCommMask]
mov edx, dword [esi + 0x80]
push 0xf
push edx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov eax, dword [esi + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
mov dword [esi + 0x80], ebx
mov dword [esi + 8], ebx
pop ebx
pop esi
ret
Function at 0x4171a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
mov edx, dword [esi + 0x80]
xor eax, eax
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0xc]
push ecx
xor edi, edi
push edx
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x4172e7
mov ecx, dword [esi + 0x4c]
sub ecx, dword [esi + 0x50]
push ebp
cmp ecx, eax
jae 0x4171f2
mov ebp, dword [esi + 0x4c]
sub ebp, dword [esi + 0x50]
mov dword [esp + 8], ebp
jmp 0x4171f8
mov dword [esp + 8], eax
mov ebp, eax
mov edx, dword [esi + 0xd0]
push ebx
mov ebx, dword [esi + 0x50]
add ebx, dword [esi + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [esi + 0x80]
lea edi, [esi + 0xc0]
push edi
lea eax, [esp + 0x18]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4172de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp eax, 0x3e5
je 0x417263
mov ecx, dword [esi + 0x80]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov dword [esp + 0xc], 0
mov ebp, dword [esp + 0xc]
mov eax, dword [esi + 0x80]
mov ebx, dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
push 0
lea edx, [esp + 0x18]
push edx
push edi
push eax
call ebx
test eax, eax
jne 0x4172de
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp eax, 0x3e4
jne 0x4172bb
push 0xa
call ebp
mov edx, dword [esi + 0x80]
push 0
lea ecx, [esp + 0x18]
push ecx
push edi
push edx
call ebx
test eax, eax
je 0x417284
mov ebp, dword [esp + 0xc]
pop ebx
mov eax, ebp
pop ebp
pop edi
add esp, 0x18
ret
mov edx, dword [esi + 0x80]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov dword [esp + 0xc], 0
mov ebp, dword [esp + 0xc]
pop ebx
mov eax, ebp
pop ebp
pop edi
add esp, 0x18
ret
mov eax, edi
pop edi
add esp, 0x18
ret

Function at 0x418ec8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
xor ebx, ebx
call fcn.004270c3
mov esi, dword [eax + 0xc]
push 5
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x418f01
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov ecx, dword [ebp - 4]
push esi
push dword [ebp + 0xc]
push ebx
call fcn.00418b14
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8