joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409400
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov bl, byte [ebp + 8]
movsx eax, bl
push esi
mov esi, ecx
movd xmm0, eax
xor eax, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm3, xmm0, 0
test edx, edx
jle 0x4094a0
cmp edx, 0x40
jb 0x409490
movaps xmm2, xmmword [0x42df40]
lea ecx, [esi + 0x20]
push edi
mov edi, edx
and edi, 0xffffffc0
nop dword [eax]
movups xmm0, xmmword [ecx - 0x20]
lea ecx, [ecx + 0x40]
add eax, 0x40
movaps xmm1, xmm3
paddb xmm0, xmm3
xorps xmm0, xmm2
movups xmmword [ecx - 0x60], xmm0
movups xmm0, xmmword [ecx - 0x50]
paddb xmm1, xmm0
xorps xmm1, xmm2
movups xmmword [ecx - 0x50], xmm1
movups xmm0, xmmword [ecx - 0x40]
paddb xmm0, xmm3
xorps xmm0, xmm2
movups xmmword [ecx - 0x40], xmm0
movups xmm0, xmmword [ecx - 0x30]
paddb xmm0, xmm3
xorps xmm0, xmm2
movups xmmword [ecx - 0x30], xmm0
cmp eax, edi
jl 0x409440
pop edi
cmp eax, edx
jge 0x4094a0
nop
mov cl, byte [esi + eax]
add cl, bl
xor cl, 0xe5
mov byte [esi + eax], cl
inc eax
cmp eax, edx
jl 0x409490
pop esi
pop ebx
pop ebp
ret

Function at 0x4094b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov bl, byte [ebp + 8]
movsx eax, bl
push esi
mov esi, ecx
movd xmm0, eax
xor eax, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm3, xmm0, 0
test edx, edx
jle 0x409550
cmp edx, 0x40
jb 0x409540
movaps xmm2, xmmword [0x42df40]
lea ecx, [esi + 0x20]
push edi
mov edi, edx
and edi, 0xffffffc0
nop dword [eax]
movups xmm0, xmmword [ecx - 0x20]
lea ecx, [ecx + 0x40]
add eax, 0x40
movaps xmm1, xmm2
xorps xmm0, xmm2
psubb xmm0, xmm3
movups xmmword [ecx - 0x60], xmm0
movups xmm0, xmmword [ecx - 0x50]
xorps xmm1, xmm0
psubb xmm1, xmm3
movups xmmword [ecx - 0x50], xmm1
movups xmm0, xmmword [ecx - 0x40]
xorps xmm0, xmm2
psubb xmm0, xmm3
movups xmmword [ecx - 0x40], xmm0
movups xmm0, xmmword [ecx - 0x30]
xorps xmm0, xmm2
psubb xmm0, xmm3
movups xmmword [ecx - 0x30], xmm0
cmp eax, edi
jl 0x4094f0
pop edi
cmp eax, edx
jge 0x409550
nop
mov cl, byte [esi + eax]
xor cl, 0xe5
sub cl, bl
mov byte [esi + eax], cl
inc eax
cmp eax, edx
jl 0x409540
pop esi
pop ebx
pop ebp
ret

Function at 0x40a447
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40a486
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40a486
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a486
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40a486
cmp dword [ecx + 0x74], 0xe
jbe 0x40a486
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x418b90
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x437330]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x418bd2
cmp byte [ebx], 0xa
jne 0x418bd2
or byte [edi + eax + 0x28], 4
jmp 0x418bd7
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x418cda
mov cl, byte [eax]
cmp cl, 0x1a
je 0x418cb5
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x418c06
mov eax, dword [ebp - 8]
jmp 0x418c26
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x418c42
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x418c20
add eax, 2
mov cl, 0xa
jmp 0x418c23
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x418be8
jmp 0x418cda
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418cb0
cmp dword [ebp - 0x10], 0
je 0x418cb0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x437330]
test byte [eax + edi + 0x28], 0x48
je 0x418c8f
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x418c7f
mov byte [esi], 0xa
jmp 0x418cd9
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x437330]
mov byte [eax + edi + 0x2a], cl
jmp 0x418cd9
cmp byte [ebp - 1], 0xa
jne 0x418c99
cmp esi, ebx
je 0x418c7a
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00420e87
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x418cda
mov byte [esi], 0xd
jmp 0x418cd9
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x437330]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x418cd7
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x418cda
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x418ce3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x437330]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x418d27
push 0xa
pop esi
cmp word [ebx], si
jne 0x418d27
or byte [eax + edi + 0x28], 4
jmp 0x418d2c
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x418e97
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x418e6f
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x418d79
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x418da3
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x418dc2
push 0xa
pop ebx
cmp word [edx], bx
jne 0x418d90
push ebx
add eax, 4
pop edx
jmp 0x418d98
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x418d3e
jmp 0x418e97
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418e6a
cmp dword [ebp - 0x14], 0
je 0x418e6a
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x437330]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x418e46
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x418e0e
mov word [esi], ax
jmp 0x418e94
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x437330]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x437330]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x437330]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x418e94
cmp word [ebp - 4], ax
jne 0x418e50
cmp esi, ebx
je 0x418e06
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00420e87
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x418e97
push 0xd
pop eax
jmp 0x418e06
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x437330]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x418e91
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x418e97
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41be42
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x41be5c
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x41be73
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x41becb
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.0041f17c
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x41becb
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41becb
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x41becb
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x41bec5
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x41bec7
xor bl, bl
mov al, bl
jmp 0x41becd
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x41e397
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41e434
push ebx
push esi
call fcn.0041e360
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041e2f6
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41e3e1
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41e433
push edi
push eax
call fcn.004185d0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41e401
call fcn.00418630
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41e432
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041e2f6
add esp, 0x20
test eax, eax
jne 0x41e420
push edi
call fcn.00418630
jmp 0x41e428
push ebx
call fcn.00418630
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41e437
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x41e448
pop esi
ret
push ebx
push edi
push esi
call fcn.0041e360
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004185d0
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41e470
push ebx
push esi
push edi
call fcn.0040c740
add esp, 0xc
push 0
call fcn.00418630
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x41e83f
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041e485
Function at 0x423a05
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00423981
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x423b74
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x423b74
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x423b29
jg 0x423a61
test eax, eax
je 0x423b1f
push 1
push 0x1000
call fcn.0041b110
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x423a84
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x423b16
push 0x8000
push ebx
call fcn.004174d1
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x423aad
jg 0x423aa8
cmp ecx, 0x1000
jb 0x423aad
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0041ba5e
add esp, 0x10
cmp eax, 0xffffffff
je 0x423af2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x423aa8
jl 0x423ad9
test ecx, ecx
jne 0x423a9a
push dword [ebp - 0xc]
push ebx
call fcn.004174d1
push esi
call fcn.00418630
add esp, 0xc
xor ebx, ebx
jmp 0x423b82
cmp byte [edi + 0x24], 0
je 0x423b09
cmp dword [edi + 0x20], 5
jne 0x423b09
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x423b14
mov ebx, dword [edi + 0x18]
jmp 0x423b16
xor ebx, ebx
push esi
call fcn.00418630
pop ecx
jmp 0x423b82
test ecx, ecx
jg 0x423aeb
jl 0x423b29
test eax, eax
jae 0x423aeb
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00420e87
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x423b49
cmp byte [edi + 0x1c], 0
je 0x423aeb
jmp 0x423b7a
push ebx
call fcn.0041f17c
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x423aeb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x423b82
cmp byte [edi + 0x1c], 0
je 0x423b7f
mov ebx, dword [edi + 0x18]
jmp 0x423b82
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00420e87
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x425e20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x425e4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x425e4d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401990
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x437ca3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [esp + 8], esi
mov dword [esi], edi
lea ecx, [esi + 0x3c]
push edi
mov dword [esp + 0x18], edi
mov dword [ecx], edi
call section..text
lea ecx, [esi + 0x40]
mov byte [esp + 0x14], 1
call fcn.004082e0
mov ecx, dword [esp + 0xc]
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x401db0
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x437d18
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
mov ebx, dword [esp + 0x20]
cmp dword [ebx], 0
push edi
mov edi, ecx
je 0x401dea
pop edi
mov al, 1
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 8
mov eax, dword [edi]
test eax, eax
jne 0x401e13
push str.gpib_32.dll_library_not_loaded
push edi
call fcn.00401ed0
add esp, 8
pop edi
xor al, al
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 8
push esi
mov esi, dword [esp + 0x24]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [ebx], eax
jne 0x401e71
lea ecx, [esp + 0xc]
call fcn.00401e90
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push eax
push ecx
push esi
push str.Cannot_get_address_of__s_function__Win32_error__i:__s
push edi
mov dword [esp + 0x30], 0
call fcn.00401ed0
mov edx, dword [esp + 0x24]
add esp, 0x14
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
pop edi
xor al, al
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 8
mov ecx, dword [esp + 0x14]
pop esi
pop edi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 8
Function at 0x402040
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x437d18
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
lea ebp, [esi + 8]
lea ebx, [esi + 0xc]
mov dword [esi + 4], edi
mov dword [ebp], edi
mov dword [ebx], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
call fcn.004012a0
push str.gpib_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, edi
mov dword [esi], eax
jne 0x402104
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0x400
push eax
push edi
push 0x13ff
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
push str.Cannot_load_gpib_32.dll_library__Win32_error__i:__s
push esi
mov dword [esp + 0x30], edi
call fcn.00401ed0
mov ecx, dword [esp + 0x24]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
push ebx
push str.ThreadIbcntl
mov ecx, esi
call fcn.00401db0
test al, al
je 0x4020ef
push ebp
push str.ThreadIberr
mov ecx, esi
call fcn.00401db0
test al, al
je 0x4020ef
lea eax, [esi + 4]
push eax
push str.ThreadIbsta
mov ecx, esi
call fcn.00401db0
mov ecx, dword [esp + 0x18]
pop edi
pop esi
test al, al
pop ebp
setne al
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x40a310
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
mov eax, 0xaa8c
call fcn.0042c7d0
mov eax, dword [0x4413a0]
push esi
push 8
mov dword [esp + 0xaa90], eax
lea eax, [esp + 0x298]
push 8
push eax
mov esi, ecx
call fcn.0042ba70
mov ecx, dword [esi + 0xc]
push 0x64
push ecx
lea edx, [esp + 0x2a8]
push 0
push edx
call fcn.00426380
add esp, 0x1c
test eax, eax
jge 0x40a190
lea eax, [esp + 0x294]
push 0x441400
push eax
call fcn.00429550
mov ecx, dword [esi + 0xc]
push ecx
push str._n_Probably_port__i_is_already_in_use._n_n
call fcn.0042d04a
add esp, 0x10
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0xaa88]
call fcn.0042c7bb
add esp, 0xaa8c
ret
push edi
lea edx, [esp + 0x108]
push edx
push 2
xor edi, edi
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x40a1df
push 0xff
lea eax, [esp + 0xc]
push eax
call sub.WS2_32.dll_gethostname
test eax, eax
jne 0x40a1d6
lea ecx, [esp + 8]
push ecx
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x40a1d6
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call sub.WS2_32.dll_inet_ntoa
mov edi, eax
call sub.WS2_32.dll_WSACleanup
test edi, edi
jne 0x40a1e4
mov edi, str.___.___.___.___
mov edx, dword [esi + 0xc]
push edx
push edi
push str.Listening_for_clients_connecting_to__s:_d_n
call fcn.0042d04a
lea eax, [esp + 0x2a4]
push eax
call fcn.00408370
add esp, 0x10
mov byte [esi + 8], 1
pop edi
jmp 0x40a210
lea ecx, [esp + 0x294]
push ecx
call fcn.00426770
add esp, 4
test eax, eax
jl 0x40a29e
push str._n_New_request:_n
call fcn.0042d04a
add esp, 4
lea edx, [esp + 0x294]
push edx
mov ecx, esi
call fcn.00409970
test eax, eax
je 0x40a265
lea eax, [esp + 0x294]
push 0x441400
push eax
call fcn.00429550
push 0x43a040
call fcn.0042d04a
add esp, 0xc
jmp 0x40a272
push str._Request_served_OK_n
call fcn.0042d04a
add esp, 4
lea ecx, [esp + 0x294]
push 0
push ecx
call fcn.00422c90
lea edx, [esp + 0x29c]
push edx
call fcn.00427130
mov al, byte [esi + 8]
add esp, 0xc
test al, al
jne 0x40a210
jmp 0x40a2b3
lea eax, [esp + 0x294]
push 0x441400
push eax
call fcn.00429550
add esp, 8
push str._nStopped_listening_for_clients_nServer_stopped_n_n
call fcn.0042d04a
mov ecx, dword [esp + 0xaa90]
add esp, 4
xor eax, eax
pop esi
call fcn.0042c7bb
add esp, 0xaa8c
ret
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
mov ecx, 0x442364
call fcn.00409840
push str.TSSInstrumentAPIApplication1
push 0x43a128
mov ecx, 0x442364
call fcn.00409800
push str.TSSInstrumentAPICommon1
push 0x43a10c
mov ecx, 0x442364
call fcn.00409800
push str.TSSInstrumentAPISignalGenerator1
push 0x43a0e4
mov ecx, 0x442364
call fcn.00409800
push str.TSSInstrumentAPICalibration1
push 0x43a0c0
mov ecx, 0x442364
call fcn.00409800
mov ecx, 0x442364
jmp 0x40a110
Function at 0x4222f0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x4413a0]
mov dword [esp + 0x190], eax
mov eax, 1
mov dword [ecx + 0xa798], eax
mov ecx, dword [0x4423e8]
test ecx, ecx
jne 0x42234e
lea edx, [esp]
push edx
push 0x101
mov dword [0x4423e8], eax
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x42234e
mov dword [0x4423e8], 0
or eax, 0xffffffff
mov ecx, dword [esp + 0x190]
call fcn.0042c7bb
add esp, 0x194
ret
mov ecx, dword [esp + 0x190]
xor eax, eax
call fcn.0042c7bb
add esp, 0x194
ret

Function at 0x4223c0
Capabilities:
Resolve dns

Disassembly:
push esi
push edi
mov esi, ecx
push esi
mov edi, eax
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
je 0x4223d8
mov dword [edi], eax
pop edi
xor eax, eax
pop esi
ret
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x4223f7
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [esp + 0xc]
pop edi
mov dword [ecx + 0xa79c], eax
or eax, 0xffffffff
pop esi
ret
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov esi, dword [edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
xor eax, eax
pop esi
ret

Function at 0x4248a0
Capabilities:
Encode data using base64

Disassembly:
push esi
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x4248b0
mov eax, 0xf
pop esi
ret
push edi
mov edi, dword [esp + 0x10]
test edi, edi
mov byte [esi], 0
je 0x42497f
push ebx
push ebp
mov ebp, dword [esp + 0x20]
cmp ebp, 2
jbe 0x424912
lea ecx, [ebp - 3]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
inc edx
movzx eax, byte [edi + 2]
xor ecx, ecx
mov ch, byte [edi]
mov cl, byte [edi + 1]
shl ecx, 8
or ecx, eax
mov eax, 4
lea ecx, [ecx]
mov ebx, ecx
and ebx, 0x3f
mov bl, byte [ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
dec eax
shr ecx, 6
test eax, eax
mov byte [eax + esi], bl
ja 0x4248f0
add esi, 4
sub ebp, 3
add edi, 3
dec edx
jne 0x4248d8
test ebp, ebp
mov byte [esi], 0
jbe 0x42497d
xor ecx, ecx
xor eax, eax
test ebp, ebp
jbe 0x424936
mov edx, ebp
mov eax, ebp
movzx ebx, byte [edi]
shl ecx, 8
or ecx, ebx
inc edi
dec edx
jne 0x424925
cmp ebp, 3
jae 0x424946
mov edx, 3
sub edx, eax
add eax, edx
nop
shl ecx, 8
dec edx
jne 0x424940
inc eax
je 0x424966
lea esp, [esp]
mov edx, ecx
and edx, 0x3f
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
dec eax
shr ecx, 6
test eax, eax
mov byte [eax + esi], dl
ja 0x424950
mov eax, 3
cmp ebp, eax
jae 0x424979
nop
mov byte [eax + esi], 0x3d
dec eax
cmp eax, ebp
ja 0x424970
mov byte [esi + 4], 0
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
ret