joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40aaa0
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40aadf
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40aadf
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40aadf
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40aadf
cmp dword [ecx + 0x74], 0xe
jbe 0x40aadf
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x412651
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x434004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x42cd60
push esi
call fcn.0041b03e
pop ecx
pop ecx
test eax, eax
jne 0x41267f
xor al, al
jmp 0x4126fc
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.00412394
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x4126b9
push dword [ebp - 0x210]
call fcn.004119be
xor al, al
jmp 0x4126fa
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4126bf
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x4126df
push edx
call fcn.00412587
pop ecx
test al, al
je 0x4126aa
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4126ed
mov bl, 1
push dword [ebp - 0x210]
call fcn.004119be
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040a14e
leave
ret
Function at 0x415127
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040a160
mov eax, dword [0x434004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0041687c
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x415169
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4152c5
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004259c0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x443350]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00418906
mov ecx, dword [esi*4 + 0x443350]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x4152be
cmp eax, dword [edi + ecx + 0x24]
jne 0x4152be
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4152be
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00418906
add esp, 0x14
test edx, edx
jl 0x4152be
jg 0x415234
test eax, eax
jb 0x4152be
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4152be
jl 0x41524e
cmp dword [ebp - 0x1008], eax
ja 0x4152be
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41526c
test ebx, ebx
je 0x4152a5
cmp ecx, edi
jae 0x4152a5
mov al, byte [ecx]
cmp al, 0xd
jne 0x415286
lea eax, [edi - 1]
cmp ecx, eax
jae 0x415292
cmp byte [ecx + 1], 0xa
jne 0x415292
inc ecx
jmp 0x415292
movzx eax, al
movsx eax, byte [eax + 0x4341d0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41526c
cmp edx, ebx
jne 0x41526c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4152c3
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040a14e
leave
ret
Function at 0x417c0a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x443350]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417c4a
cmp byte [ebx], 0xa
jne 0x417c4a
or byte [eax + edi + 0x28], 4
jmp 0x417c4f
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x417d4d
mov al, byte [edx]
cmp al, 0x1a
je 0x417d2f
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x417c7e
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x417ca3
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x417cad
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x417c60
jmp 0x417d4d
push 0
lea eax, [ebp - 0xc]
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 0x417d2a
cmp dword [ebp - 0xc], 0
je 0x417d2a
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x443350]
test byte [eax + edi + 0x28], 0x48
je 0x417d04
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x417cef
mov byte [esi], dl
jmp 0x417d00
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x443350]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x417d4d
cmp byte [ebp - 1], 0xa
jne 0x417d13
cmp esi, ebx
jne 0x417d13
mov byte [esi], 0xa
jmp 0x417d4c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418924
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x417d4d
mov byte [esi], 0xd
jmp 0x417d4c
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x443350]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417d49
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417d4d
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417d56
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x443350]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417d99
cmp word [esi], dx
jne 0x417d99
or byte [edi + eax + 0x28], 4
jmp 0x417d9e
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x417ef1
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x417ed1
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x417de0
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x417e16
cmp eax, edx
jae 0x417e22
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x417db8
jmp 0x417ef1
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 0x417ecd
cmp dword [ebp - 0x14], 0
je 0x417ecd
mov eax, dword [ebx*4 + 0x443350]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x417ea5
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x417e6e
mov word [esi], cx
jmp 0x417ea1
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x443350]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x443350]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x443350]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x417ef1
pop ebx
cmp word [ebp - 4], bx
jne 0x417eb6
cmp esi, dword [ebp + 0xc]
jne 0x417eb6
mov word [esi], bx
jmp 0x417eee
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00418924
add esp, 0x10
cmp word [ebp - 4], bx
je 0x417ef1
push 0xd
jmp 0x417eea
mov ecx, dword [ebx*4 + 0x443350]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417ee8
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417ef1
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x418712
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00418583
Function at 0x41abbb
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42d960
push 0x42d958
push str.FlsAlloc
push 0x1e
call fcn.0041aa7c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41abef
push dword [ebp + 8]
mov ecx, esi
call dword [0x4261f0]
call esi
jmp 0x41abf5
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41ac39
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42d970
push 0x42d968
push str.FlsGetValue
push 0x20
call fcn.0041aa7c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41ac70
push dword [ebp + 8]
mov ecx, esi
call dword [0x4261f0]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41ca4b
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041c572

Function at 0x41d3d4
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x434004]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x41d41f
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0041d573
test al, al
jne 0x41d419
sub edx, 2
cmp edx, edi
jne 0x41d3ff
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x41d441
lea eax, [edi + 2]
cmp edx, eax
je 0x41d441
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0041d320
add esp, 0x10
jmp 0x41d53b
push esi
lea ecx, [ebp - 0x255]
call fcn.0041d573
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41d484
push dword [ebp - 0x25c]
jmp 0x41d431
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x41d4c1
cmp word [ebp - 0x226], 0
je 0x41d4e2
cmp word [ebp - 0x226], ax
jne 0x41d4c1
cmp word [ebp - 0x224], 0
je 0x41d4e2
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0041d320
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x41d52e
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x41d49b
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x41d516
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x41d53b
push 0x41d150
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004226a0
add esp, 0x10
jmp 0x41d50b
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a14e
leave
ret
Function at 0x41de4a
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 0x41dee7
push ebx
push esi
call fcn.0041de13
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.0041ba19
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41de94
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41dee6
push edi
push eax
call fcn.004199e6
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41deb4
call fcn.004171ee
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41dee5
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041ba19
add esp, 0x20
test eax, eax
jne 0x41ded3
push edi
call fcn.004171ee
jmp 0x41dedb
push ebx
call fcn.004171ee
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 0x41deea
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x41defb
pop esi
ret
push ebx
push edi
push esi
call fcn.0041de13
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004199e6
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41df23
push ebx
push esi
push edi
call fcn.0040ade0
add esp, 0xc
push 0
call fcn.004171ee
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x423a55
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]
push dword [ebp + 0xc]
push ebx
call fcn.004239d1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x423bcd
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x423bcd
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x423b7c
jg 0x423aae
test eax, eax
je 0x423b72
push 1
push 0x1000
call fcn.0041a8ec
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x423ad4
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x423b69
push 0x8000
push ebx
call fcn.00412f90
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x423b00
jg 0x423afb
cmp ecx, 0x1000
jb 0x423b00
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00419469
add esp, 0x10
cmp eax, 0xffffffff
je 0x423b45
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 0x423afb
jl 0x423b2c
test ecx, ecx
jne 0x423aed
push dword [ebp - 0xc]
push ebx
call fcn.00412f90
push esi
call fcn.004171ee
add esp, 0xc
xor edi, edi
jmp 0x423bde
cmp byte [edi + 0x24], 0
je 0x423b5c
cmp dword [edi + 0x20], 5
jne 0x423b5c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x423b67
mov edi, dword [edi + 0x18]
jmp 0x423b69
xor edi, edi
push esi
call fcn.004171ee
pop ecx
jmp 0x423bde
test ecx, ecx
jg 0x423b3e
jl 0x423b7c
test eax, eax
jae 0x423b3e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00418924
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x423b9f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x423b3e
jmp 0x423bd6
push ebx
call fcn.0041425a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x423b3e
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x423bde
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x423bdb
mov edi, dword [edi + 0x18]
jmp 0x423bde
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00418924
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x425830
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42585d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42585d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43100c
nop
nop
nop
nop
nop
pop eax
add eax, 0x403e6a
nop
sub eax, 0x403e10
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x431030
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43101e
nop
nop
nop
nop
popal
nop
jmp fcn.00401219

Function at 0x428290
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x20000]
push edi
jmp 0x4282aa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4282b1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4282a0
mov eax, 1
add ebx, ebx
jne 0x4282c3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4282b8
jne 0x4282d4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4282b8
xor ecx, ecx
sub eax, 3
jb 0x4282e8
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x42835a
mov ebp, eax
add ebx, ebx
jne 0x4282f3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x428300
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x428324
inc ecx
add ebx, ebx
jne 0x428310
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x428305
jne 0x428321
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x428305
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x428344
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x428335
jmp 0x4282a6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x428344
add edi, ecx
jmp 0x4282a6
pop esi
lea edi, [esi + 0x26000]
mov eax, dword [edi]
or eax, eax
je 0x4283ac
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x2dc28]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x2dc64]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x428361
mov ecx, edi
jns 0x428390
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 + 0x2dc6c]
or eax, eax
je 0x4283a6
mov dword [ebx], eax
add ebx, 4
jmp 0x42837e
call dword [esi + 0x2dc68]
mov ebp, dword [esi + 0x2dc70]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1e7]
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 0x4283e0
sub esp, 0xffffff80
jmp 0x401e60
Function at 0x401000
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
push edi
push 6
push 1
push 2
mov byte [ebp - 0x24], 0
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
cmp edi, 0xffffffff
jne 0x401090
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.get_port_from_controller:_socket_____Error_at_socket__:__ld_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
call dword [sym.imp.WS2_32.dll_WSACleanup]
or eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040176f
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.MSVCR100.dll_printf]
push str.get_port_from_controller:_socket___is_OK._n
call esi
add esp, 4
mov eax, 2
push str.10.180.0.115
mov word [ebp - 0x34], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x539
mov dword [ebp - 0x30], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea ecx, [ebp - 0x34]
push ecx
push edi
mov word [ebp - 0x32], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4010fc
push str.get_port_from_controller:_connect_____Failed_to_connect_and_get_port._n
call esi
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040176f
mov esp, ebp
pop ebp
ret
push str.get_port_from_controller:_connect___is_OK._n
call esi
push str.get_port_from_controller:_Getting_echo_port..._n
call esi
add esp, 8
push 0
push 0x1f
lea edx, [ebp - 0x24]
push edx
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
je 0x401168
cmp edi, 0x2746
je 0x401168
test edi, edi
jle 0x401172
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
push str.get_port_from_controller::_recv___is_OK._n
movzx ebx, ax
call esi
push ebx
push str.get_port_from_controller::_Received_data_is:___d__n
call esi
push edi
push str.get_port_from_controller::_Bytes_received_is:__ld._n
call esi
add esp, 0x18
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040176f
mov esp, ebp
pop ebp
ret
push str.get_port_from_controller:_Connection_Closed._n
call esi
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.0040176f
mov esp, ebp
pop ebp
ret