joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c89f
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor eax, eax
push ebp
push esi
push edi
mov esi, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call ebx
mov edi, dword [esp + 0x38]
mov ebp, eax
mov ecx, dword [edi]
lea eax, [esp + 0x10]
push eax
push edi
call dword [ecx + 0x48]
test eax, eax
js 0x40c8d6
cmp dword [esp + 0x10], 0
jne 0x40c91e
call ebx
sub eax, ebp
cmp eax, 0x7d0
ja 0x40c91e
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40c8c0
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x40c8c0
mov eax, dword [edi]
lea ecx, [esp + 0x10]
push ecx
push edi
call dword [eax + 0x48]
mov ebx, eax
test ebx, ebx
js 0x40c98c
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40c984
mov eax, dword [ecx]
lea edx, [esp + 0x14]
push edx
push 0x4254fc
push ecx
call dword [eax]
mov ebx, eax
test ebx, ebx
js 0x40c976
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov ebx, eax
test ebx, ebx
js 0x40c96c
mov eax, dword [esp + 0x14]
push dword [esp + 0x3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov ebx, eax
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [esp + 0x10]
test ebx, ebx
js 0x40c98c
test ecx, ecx
jne 0x40c9dd
xor ebp, ebp
cmp dword [esi + 8], ebp
je 0x40c9dd
cmp dword [esi + 0x18], ebp
jne 0x40c9dd
cmp dword [esi + 0x14], ebp
je 0x40c9dd
push dword [esi + 0x14]
mov ecx, esi
call fcn.0040ced0
mov edi, eax
test edi, edi
je 0x40c9dd
push 0x204
push ebp
push ebp
push ebp
push ebp
push 1
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
push 5
push dword [esi + 8]
call dword [sym.imp.USER32.dll_ShowWindow]
push edi
push dword [esi + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
push edi
call fcn.004166b0
pop ecx
pop edi
not ebx
pop esi
shr ebx, 0x1f
pop ebp
mov al, bl
pop ebx
add esp, 0x24
ret 8
Function at 0x40d09d
Capabilities:
Hide graphical window

Disassembly:
mov al, byte [esp + 0x14]
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x20]
mov ebx, ecx
push esi
push 0
push ebp
mov dword [ebx + 8], ebp
mov byte [ebx + 0x1e], al
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [esp + 0x20]
mov ecx, ebx
call fcn.0040ce1a
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x2c]
mov dword [ebx + 0x18], eax
lea eax, [esp + 0xc]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowRect]
push 2
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetParent]
push eax
push 0
call dword [sym.imp.USER32.dll_MapWindowPoints]
cmp dword [ebx + 4], 0
je 0x40d107
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
push edi
push ebx
push dword [ebx]
sub esi, eax
lea edi, [eax + 1]
push 0
push ebp
sub esi, 2
call dword [sym.imp.USER32.dll_GetParent]
push eax
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x24]
push eax
push esi
push dword [esp + 0x2c]
xor esi, esi
push edi
push 0x40000000
push esi
push 0x424e04
push esi
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [ebx + 4], eax
pop edi
cmp dword [ebx + 0x10], esi
jne 0x40d189
test ebp, ebp
je 0x40d19f
cmp dword [ebx + 0x18], esi
jne 0x40d19f
cmp dword [ebx + 0x14], esi
je 0x40d19f
push dword [ebx + 0x14]
mov ecx, ebx
call fcn.0040ced0
mov esi, eax
test esi, esi
je 0x40d19f
push 5
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
push ebp
call dword [sym.imp.USER32.dll_SetWindowTextW]
push esi
call fcn.004166b0
pop ecx
jmp 0x40d19f
test eax, eax
je 0x40d19f
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_UpdateWindow]
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
Function at 0x40d42a
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x42546c
push 1
push ebx
push 0x42553c
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40d4fb
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push 0x42552c
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x40d4f2
cmp byte [ebp + 8], bl
je 0x40d47d
mov eax, dword [ebp - 8]
push 2
push dword [ebp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
cmp dword [ebp + 0x18], ebx
je 0x40d49a
mov eax, dword [ebp - 4]
push dword [ebp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 4]
push ebx
mov ecx, dword [eax]
cmp dword [ebp + 0x1c], ebx
jne 0x40d4ac
push 0x424254
jmp 0x40d4af
push dword [ebp + 0x1c]
push eax
call dword [ecx + 0x44]
cmp dword [ebp + 0x20], ebx
je 0x40d4c4
mov eax, dword [ebp - 4]
push dword [ebp + 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
cmp dword [ebp + 0x14], ebx
je 0x40d4d5
mov eax, dword [ebp - 4]
push dword [ebp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [ebp - 8]
push 1
push dword [ebp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
js 0x40d4e9
mov bl, 1
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0x1c

Function at 0x40d5a9
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
ret 8

Function at 0x40da67
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.00411400
push 0x800
lea eax, [ebp - 0x1020]
push eax
call fcn.0040d5a9
cmp byte [0x458df2], 0
jne 0x40dafc
push 6
push dword [0x42d038]
lea eax, [ebp - 0x1020]
push eax
call fcn.00403520
push eax
call fcn.00406c39
test eax, eax
jne 0x40dafc
push 0x424270
call fcn.0040d943
lea eax, [ebp - 0x1020]
push eax
call fcn.00416695
xor ecx, ecx
push 0x1e
push ecx
mov word [ebp + eax*2 - 0x101e], cx
lea eax, [ebp - 0x20]
push eax
call fcn.00412430
add esp, 0x10
mov dword [ebp - 0x1c], 3
push 0x14
pop eax
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x1020]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov esp, ebp
pop ebp
ret
Function at 0x40db58
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
cmp dword [0x42d04c], 0
push ebx
push esi
push edi
mov ebx, 0x400
jne 0x40dba3
push 0x64
lea eax, [ebp - 0x12c]
push eax
push 0xf
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ax, word [ebp - 0x12c]
mov word [0x45ae20], ax
xor eax, eax
mov word [0x45ae22], ax
mov dword [0x42d04c], 0x45ae20
push 0x32
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00405979
mov edi, dword [ebp + 0x10]
xor eax, eax
mov esi, dword [ebp + 0x14]
push esi
push edi
push 0x42d03c
mov word [edi], ax
lea eax, [ebp - 0x64]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
xor eax, eax
mov word [edi + esi*2 - 2], ax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40ddfd
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x200c
call fcn.00411400
cmp byte [0x44d708], 0
je 0x40dea6
lea eax, [ebp - 0x200c]
push eax
push dword [ebp + 8]
call fcn.0040f196
lea eax, [ebp - 8]
push eax
push 1
push 0
push str.SoftwareWinRAR_SFX
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40dea6
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x1000
push eax
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x200c]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40de9d
mov eax, dword [ebp - 4]
mov ecx, 0x7ff
shr eax, 1
mov dword [ebp - 4], eax
cmp eax, ecx
jb 0x40de81
mov eax, ecx
push dword [ebp + 0xc]
xor ecx, ecx
mov word [ebp + eax*2 - 0x100c], cx
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.00405a59
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esp, ebp
pop ebp
ret 8
Function at 0x40df52
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x2004
call fcn.00411400
mov ecx, dword [esp + 0x2014]
push ebx
xor ebx, ebx
push esi
test ecx, ecx
je 0x40df6d
mov byte [ecx], bl
mov edx, dword [esp + 0x2020]
test edx, edx
je 0x40df7a
mov byte [edx], bl
mov esi, dword [esp + 0x2010]
test esi, esi
je 0x40e03d
movzx eax, word [esi]
test ax, ax
je 0x40e03d
push ebp
mov ebp, dword [esp + 0x2018]
push edi
mov edi, dword [esp + 0x2020]
mov dword [esp + 0x10], ebx
movzx eax, ax
add esi, 2
cmp eax, 0x3d
jne 0x40dfc7
test edi, edi
je 0x40dfd1
test ebx, ebx
jne 0x40dfd1
test ecx, ecx
je 0x40dfc3
mov byte [ecx], 1
mov ebx, ebp
jmp 0x40dfe8
cmp eax, 0xd
je 0x40dffb
cmp eax, 0xa
je 0x40dffe
mov word [ebp], ax
add ebp, 2
mov eax, dword [esp + 0x202c]
add eax, 0xfffffffe
cmp dword [esp + 0x10], eax
jge 0x40dff6
movzx eax, word [esi]
inc dword [esp + 0x10]
test ax, ax
jne 0x40dfa9
jmp 0x40dffe
mov byte [edx], 1
jmp 0x40dffe
add esi, 2
xor eax, eax
mov word [ebp], ax
test edi, edi
je 0x40e037
mov word [edi], ax
test ebx, ebx
je 0x40e037
push 0x1000
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [esp + 0x202c]
lea eax, [esp + 0x18]
push eax
push edi
call fcn.00405a59
xor eax, eax
mov word [ebx], ax
pop edi
mov eax, esi
pop ebp
jmp 0x40e03f
xor eax, eax
pop esi
pop ebx
add esp, 0x2004
ret 0x18

Function at 0x40e04a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push eax
push dword [ebp + 0xc]
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderLocation]
mov ebx, eax
neg ebx
sbb bl, bl
add bl, 1
je 0x40e099
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp - 4]
dec eax
neg eax
sbb al, al
lea ebx, [eax + 1]
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
jmp 0x40e0a1
mov eax, dword [ebp + 8]
xor ecx, ecx
mov word [eax], cx
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x41013c
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x1040
call fcn.00411400
push ebx
push esi
mov esi, dword [esp + 0x1050]
xor ebx, ebx
cmp word [esi], bx
je 0x410374
push esi
call fcn.00416695
pop ecx
cmp eax, 0x7f6
jae 0x410374
push edi
push 0x3c
pop edi
push edi
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.00412430
add esp, 0xc
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], 0x1c0
cmp byte [esp + 0x1058], bl
je 0x41019c
mov dword [esp + 0x14], 0x5c0
movzx ecx, word [esi]
lea edx, [esi + 2]
push 0x22
pop edi
cmp cx, di
je 0x4101ac
mov edx, esi
mov dword [esp + 0x20], edx
mov eax, ebx
push ebp
test cx, cx
je 0x4101f6
push 0x20
mov ecx, esi
pop ebp
cmp word [ecx], di
jne 0x4101d7
jmp 0x4101ca
cmp word [esi + eax*2], di
je 0x4101d3
inc eax
cmp word [esi + eax*2], bx
jne 0x4101c4
jmp 0x4101d7
mov word [esi + eax*2], bp
cmp word [esi + eax*2], bp
je 0x41034b
cmp word [esi + eax*2 + 2], 0x2f
je 0x410345
inc eax
lea ecx, [esi + eax*2]
cmp word [ecx], bx
jne 0x4101bd
mov eax, dword [esp + 0x28]
test eax, eax
je 0x410203
cmp word [eax], bx
jne 0x41021d
cmp byte [esp + 0x105c], bl
jne 0x41021d
cmp word [0x44e70a], bx
je 0x41021d
mov dword [esp + 0x28], 0x44e70a
push edx
mov dword [esp + 0x34], 1
call fcn.004030b2
mov esi, eax
test esi, esi
je 0x410248
push str..inf
push esi
call fcn.00406c17
test eax, eax
jne 0x410248
mov dword [esp + 0x20], 0x4253d4
push dword [esp + 0x24]
call fcn.00402343
test al, al
je 0x410270
push 0x800
lea eax, [esp + 0x54]
push eax
push dword [esp + 0x2c]
call fcn.00402e3b
lea eax, [esp + 0x50]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x410372
mov edi, dword [esp + 0x1054]
mov ebp, dword [sym.imp.USER32.dll_ShowWindow]
cmp byte [0x44d700], bl
jne 0x4102a9
cmp byte [esp + 0x105c], bl
jne 0x4102a9
cmp byte [0x459e12], bl
je 0x410308
test edi, edi
je 0x4102be
push edi
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x4102be
push ebx
push edi
call ebp
mov bl, 1
push 0x7d0
push dword [esp + 0x50]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push dword [esp + 0x4c]
call fcn.0041059d
cmp byte [0x459e12], 0
je 0x410308
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x410308
mov eax, dword [esp + 0x10]
add eax, 0x3e8
cmp eax, dword [0x459e14]
jbe 0x410308
mov dword [0x459e14], eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x410325
push str..exe
push esi
call fcn.00406c17
test eax, eax
je 0x41035e
cmp byte [0x44d700], 0
mov al, byte [esp + 0x105c]
je 0x410365
test al, al
jne 0x410365
mov dword [0x459e18], 0x1b58
jmp 0x410365
cmp word [esi + eax*2], bp
jne 0x410351
xor ecx, ecx
mov word [esi + eax*2], cx
inc eax
lea eax, [esi + eax*2]
mov dword [esp + 0x28], eax
jmp 0x4101fa
mov al, byte [esp + 0x105c]
test bl, bl
je 0x410372
test al, al
je 0x410372
push 1
push edi
call ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1040
ret 0xc
Function at 0x41037f
Capabilities:
Hide graphical window

Disassembly:
and dword [0x4466dc], 0
push 1
push dword [esp + 8]
mov byte [0x4466d0], 1
mov byte [0x4466d1], 1
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 2
push dword [esp + 0xc]
call fcn.0040112d
cmp dword [0x44d6f0], 0
jne 0x4103bf
cmp byte [0x4466d6], 0
je 0x4103c8
cmp dword [0x4466cc], 0
jne 0x4103db
push 0
push 1
push 0x111
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_SendMessageW]
ret 4

Function at 0x4104ae
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00411400
cmp byte [0x44d708], 0
je 0x410538
cmp word [0x459e20], 0
je 0x410538
push esi
lea eax, [ebp - 0x1008]
push eax
push 0x459e20
call fcn.0040f196
lea eax, [ebp - 8]
xor esi, esi
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0x20006
push esi
push esi
push esi
push str.SoftwareWinRAR_SFX
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x410537
push dword [ebp + 8]
call fcn.00416695
pop ecx
lea eax, [eax*2 + 2]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x1008]
push 1
push esi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x41053e
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2000
call fcn.00411400
push esi
push dword [ebp + 8]
push str.sfxcmd
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x1000
lea eax, [ebp - 0x2000]
push eax
push dword [ebp + 8]
call fcn.00405830
mov esi, eax
test esi, esi
je 0x410596
movzx ecx, word [esi]
push ecx
jmp 0x410581
add esi, 2
movzx eax, word [esi]
push eax
call fcn.00405927
test al, al
jne 0x41057a
push esi
push str.sfxpar
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x401000
Capabilities:
Encode data using xor
Encrypt data using aes

Disassembly:
push ebp
mov ebp, esp
mov edx, ecx
test edx, edx
je 0x401182
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x401182
mov eax, dword [edx]
push ebx
mov ebx, eax
mov dword [ecx + 0xf0], 0xa
rol eax, 8
and eax, 0xff00ff
ror ebx, 8
push esi
and ebx, 0xff00ff00
or ebx, eax
mov eax, dword [edx + 4]
push edi
mov edi, eax
mov dword [ecx], ebx
rol eax, 8
and eax, 0xff00ff
ror edi, 8
and edi, 0xff00ff00
or edi, eax
mov eax, dword [edx + 8]
mov esi, eax
mov dword [ecx + 4], edi
rol eax, 8
and eax, 0xff00ff
ror esi, 8
and esi, 0xff00ff00
or esi, eax
mov eax, dword [edx + 0xc]
mov edx, eax
mov dword [ecx + 8], esi
rol eax, 8
and eax, 0xff00ff
ror edx, 8
and edx, 0xff00ff00
or edx, eax
mov dword [ecx + 0xc], edx
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [eax*4 + 0x407ab8]
mov eax, edx
shr eax, 8
xor ecx, 0x1000000
movzx eax, al
and ecx, 0xff000000
mov eax, dword [eax*4 + 0x4076b8]
and eax, 0xff0000
xor ecx, eax
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + str.cc]
xor ecx, eax
movzx eax, dl
mov eax, dword [eax*4 + 0x407290]
and eax, 0xff00
xor ecx, eax
xor ecx, ebx
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0x10]
mov dword [eax], ecx
xor ecx, edi
mov edi, 0x407694
mov dword [ebx + 0x14], ecx
xor ecx, esi
mov dword [ebx + 0x18], ecx
xor ecx, edx
mov dword [ebx + 0x1c], ecx
nop
mov ebx, dword [eax + 0xc]
mov esi, eax
add eax, 0x10
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
mov edx, dword [ecx*4 + 0x4076b8]
mov ecx, ebx
shr ecx, 0x10
and edx, 0xff0000
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x407ab8]
and ecx, 0xff000000
xor edx, ecx
mov ecx, ebx
shr ecx, 0x18
movzx ecx, byte [ecx*4 + str.cc]
xor edx, ecx
movzx ecx, bl
mov ecx, dword [ecx*4 + 0x407290]
and ecx, 0xff00
xor edx, ecx
xor edx, dword [esi]
xor edx, dword [edi]
add edi, 4
mov dword [eax], edx
mov ecx, dword [eax - 0xc]
xor ecx, edx
mov dword [eax + 4], ecx
mov edx, dword [eax - 8]
xor edx, ecx
mov dword [eax + 8], edx
xor edx, ebx
mov dword [eax + 0xc], edx
cmp edi, 0x4076b8
jne 0x401100
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
ret
or eax, 0xffffffff
pop ebp
ret
Function at 0x401810
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x40b004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [ebp - 0x90], eax
push esi
mov esi, ebx
push edi
mov edi, edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x98], edi
mov dword [ebp - 0x94], edx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401847
sub esi, ecx
jne 0x401862
push esi
push str.ERROR
push str.sdwan_server_is_empty
jmp 0x4019b2
mov ecx, edx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401867
sub ecx, edx
jne 0x401882
push ecx
push str.ERROR
push str.username_is_empty
jmp 0x4019b2
mov ecx, dword [ebp - 0x90]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401890
sub ecx, edx
jne 0x4018ab
push ecx
push str.ERROR
push str.password_is_empty
jmp 0x4019b2
mov esi, dword [ebp + 0x10]
mov ecx, 0x612
lea eax, [esi - 0x2e]
cmp ax, cx
ja 0x4019a6
test di, di
je 0x401998
push dword [ebp + 0x24]
movzx eax, si
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push dword [ebp - 0x90]
movzx eax, di
push dword [ebp - 0x94]
push eax
push ebx
push str.try_set_server__s:_u_using__s:_s_mtu__u_encrty__d_force__d_mode__d
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.00401710
add esp, 0x2c
lea eax, [ebp - 0x88]
push eax
call fcn.00401750
add esp, 4
lea eax, [ebp - 0x8c]
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
xor edi, edi
cmp eax, 1
cmove edi, dword [ebp - 0x8c]
test edi, edi
jne 0x401958
push ebx
push str._s_is_not_ipv4_format__treat_as_domain
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.00401710
lea eax, [ebp - 0x88]
push eax
call fcn.00401750
add esp, 0x14
mov eax, ebx
jmp 0x40195a
xor eax, eax
push dword [ebp + 0x24]
mov edx, eax
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x14]
push dword [ebp - 0x90]
push dword [ebp - 0x94]
push dword [ebp - 0x98]
push edi
call fcn.00405350
add esp, 0x28
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406188
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.port_is_invalid
jmp 0x4019b2
push 0
push str.ERROR
push str.mtu_is_invalid
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406188
mov esp, ebp
pop ebp
ret
Function at 0x4019d0
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40b004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x10], edx
push esi
mov esi, ebx
push edi
xor edi, edi
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x4019f0
sub esi, ecx
jne 0x401a0e
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406188
mov esp, ebp
pop ebp
ret
push 0x3b
push ebx
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x401a99
cmp edi, 0x20
jge 0x401a99
push 0x2f
push ebx
mov byte [esi], 0
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x401a40
mov dword [ebp - 0xc], eax
jmp 0x401a78
mov byte [eax], 0
lea eax, [ebp - 8]
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
mov ebx, dword [ebp - 0x10]
xor ecx, ecx
cmp eax, 1
mov eax, dword [ebp - 0xc]
cmove ecx, dword [ebp - 8]
inc eax
push eax
mov dword [ebx + edi*8], ecx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [ebx + edi*8 + 4], eax
mov dword [ebp - 0xc], 1
lea ebx, [esi + 1]
push 0x3b
push ebx
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
mov esi, eax
cmp dword [ebp - 0xc], 0
lea eax, [edi + 1]
cmove eax, edi
mov edi, eax
test esi, esi
jne 0x401a20
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401aa0
sub ecx, edx
je 0x401af3
cmp edi, 0x20
jge 0x401af3
push 0x2f
push ebx
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x401af3
lea eax, [ebp - 8]
mov byte [esi], 0
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
mov ebx, dword [ebp - 0x10]
xor ecx, ecx
cmp eax, 1
cmove ecx, dword [ebp - 8]
mov dword [ebx + edi*8], ecx
lea ecx, [esi + 1]
push ecx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [ebx + edi*8 + 4], eax
inc edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406188
mov esp, ebp
pop ebp
ret