joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100012b0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x10020060]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xd8], ecx
mov eax, dword [ebp + 8]
push eax
push 0x1001cd40
mov ecx, dword [ebp - 0xd8]
push ecx
call fcn.10006020
add esp, 0xc
mov dword [ebp - 0xb4], 0x400
mov dword [ebp - 0xb0], 0
push 0x10
lea edx, [ebp - 0xc4]
push edx
push 0x12
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea ecx, [ebp - 0xc4]
push ecx
call fcn.10007d90
add esp, 4
mov dword [ebp - 0xac], eax
push 0x10
lea edx, [ebp - 0xc4]
push edx
push 0x10
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea ecx, [ebp - 0xc4]
push ecx
call fcn.10007d90
add esp, 4
mov dword [ebp - 0xa8], eax
push 0x10
lea edx, [ebp - 0xd4]
push edx
push 0xe
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0xa4], ecx
push 0x10
lea edx, [ebp - 0x14]
push edx
push 0xf
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0xa0], ecx
push 0x10
lea edx, [ebp - 0xc4]
push edx
push 0x1010
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea ecx, [ebp - 0xc4]
push ecx
call fcn.10007d90
add esp, 4
mov dword [ebp - 0x9c], eax
push 0x80
lea edx, [ebp - 0x98]
push edx
lea eax, [ebp - 0xb0]
push eax
mov ecx, dword [ebp - 0xd8]
call fcn.1000ba00
push eax
push 0
mov ecx, dword [ebp - 0xb4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
lea edx, [ebp - 0x98]
push edx
push 0x1001cd44
mov eax, dword [ebp - 0xd8]
push eax
call fcn.10006020
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000f281
mov esp, ebp
pop ebp
ret 4
Function at 0x100047b0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001a6f8
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x10020060]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0xc]
call fcn.10005ca0
mov ecx, 0x10021f10
call fcn.10004b40
movzx eax, al
test eax, eax
jne 0x10004890
cmp dword [ebp + 8], 0x91
je 0x10004890
lea ecx, [ebp - 0x14]
call fcn.10006550
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
push ecx
push 0x1001cd40
lea edx, [ebp - 0x14]
push edx
call fcn.10006020
add esp, 0xc
mov ecx, 0x10021f10
call fcn.1000ba00
push eax
push 0x3e8
push 0x3e8
mov ecx, dword [ebp + 0xc]
call fcn.100063a0
push eax
push 0x1001cdf4
lea ecx, [ebp - 0x14]
call fcn.1000ba00
push eax
push str.strings
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.10005f90
push 0x1001cde0
push 0x1001cde4
mov ecx, dword [ebp + 0xc]
call fcn.100048f0
test eax, eax
je 0x10004881
jmp 0x10004869
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.100063c0
mov ecx, dword [ebp + 0xc]
call fcn.10004b40
movzx ecx, al
test ecx, ecx
je 0x100048ab
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp + 0xc]
call fcn.10005bf0
mov ecx, dword [ebp + 0xc]
call fcn.10004b40
movzx eax, al
neg eax
sbb eax, eax
add eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret

Function at 0x10006ae0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001a568
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x10020060]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
mov dword [eax], vtable.CDownloadDlg.0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x44], vtable.CDownloadDlg.1.0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x10]
movzx eax, byte [edx + 4]
test eax, eax
jne 0x10006b48
movzx ecx, byte [0x10021eda]
test ecx, ecx
jne 0x10006b48
mov ecx, dword [ebp - 0x10]
add ecx, 0x30
call fcn.1000ba00
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0x10]
add ecx, 0x68
call fcn.100063c0
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.10006960
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
call fcn.10001500
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x1000b420
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], ecx
xor eax, eax
jne 0x1000b429
xor ecx, ecx
jne 0x1000b429
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x1000b44a
mov eax, 0xd
jmp 0x1000b476
xor eax, eax
jne 0x1000b431
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esp, ebp
pop ebp
ret 0xc

Function at 0x1000b4c0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
xor eax, eax
jne 0x1000b4c9
xor ecx, ecx
jne 0x1000b4c9
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jne 0x1000b4ea
mov eax, 0xd
jmp 0x1000b53f
xor eax, eax
jne 0x1000b4d1
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
cmp dword [ebp - 0xc], 1
jne 0x1000b4fb
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 7
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esp, ebp
pop ebp
ret 8
Function at 0x1000c250
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x10020060]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x130], ecx
lea ecx, [ebp - 0x14]
call fcn.1000c3b0
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax + 4]
or ecx, 0x2001f
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x14]
call fcn.1000c1e0
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x1000c2bb
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x124], edx
lea ecx, [ebp - 0x14]
call fcn.1000c430
mov eax, dword [ebp - 0x124]
jmp 0x1000c34c
mov dword [ebp - 4], 0x100
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x120]
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x1000c321
lea ecx, [ebp - 0x120]
push ecx
lea ecx, [ebp - 0x14]
call fcn.1000c250
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x1000c318
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x128], edx
lea ecx, [ebp - 0x14]
call fcn.1000c430
mov eax, dword [ebp - 0x128]
jmp 0x1000c34c
mov dword [ebp - 4], 0x100
jmp 0x1000c2c2
lea ecx, [ebp - 0x14]
call fcn.1000c3e0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x130]
call fcn.1000c480
mov dword [ebp - 0x12c], eax
lea ecx, [ebp - 0x14]
call fcn.1000c430
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.1000f281
mov esp, ebp
pop ebp
ret 4
Function at 0x1000e250
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x14]
call fcn.1000e2e0
mov ecx, eax
call fcn.1000ba00
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x1000e2c3
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
add eax, 1
push eax
mov ecx, dword [ebp + 0xc]
call fcn.100063a0
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.100060e0
mov eax, dword [ebp - 0xc]
jmp 0x1000e2cd
mov ecx, dword [ebp + 0xc]
call fcn.10005ca0
xor eax, eax
mov esp, ebp
pop ebp
ret 8
Function at 0x1000f13c
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x100213e0], 0
push esi
jne 0x1000f0af
call fcn.1000efd5
test eax, eax
je 0x1000f0f2
mov eax, dword [0x100213e0]
cmp eax, 1
jne 0x1000f0d0
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x1000f0f2
pop esi
ret
push eax
call dword [0x100213e8]
test eax, eax
jne 0x1000f13a
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x1000f0f6
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x100213e0]
call dword [0x100213e8]
mov edi, eax
test edi, edi
je 0x1000f11b
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1000f137
mov edi, esi
add esi, 0xff0
push edi
push dword [0x100213e0]
call dword [0x100213e4]
add edi, 0x10
cmp edi, esi
jb 0x1000f123
mov eax, edi
pop edi
pop esi
ret
jmp 0x1000f09c

Function at 0x1000f281
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x10020060]
jne 0x1000f28b
repz ret
jmp fcn.1001054c
Function at 0x100181e0
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.10012831
and dword [ebp - 4], 0
cmp dword [0x10021df8], 0
mov ebx, eax
jne 0x10018291
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x10018342
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1001ccdc
push edi
call esi
test eax, eax
je 0x10018342
push eax
call fcn.100127bf
mov dword [esp], 0x1001cccc
push edi
mov dword [0x10021df8], eax
call esi
push eax
call fcn.100127bf
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x10021dfc], eax
call esi
push eax
call fcn.100127bf
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x10021e00], eax
call esi
push eax
call fcn.100127bf
pop ecx
mov dword [0x10021e08], eax
test eax, eax
je 0x10018291
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.100127bf
pop ecx
mov dword [0x10021e04], eax
mov eax, dword [0x10021e04]
cmp eax, ebx
je 0x100182e9
cmp dword [0x10021e08], ebx
je 0x100182e9
push eax
call fcn.1001283a
push dword [0x10021e08]
mov esi, eax
call fcn.1001283a
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x100182e9
test edi, edi
je 0x100182e9
call esi
test eax, eax
je 0x100182e0
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x100182e0
test byte [ebp - 0xc], 1
jne 0x100182e9
or dword [ebp + 0x10], 0x200000
jmp 0x10018322
mov eax, dword [0x10021dfc]
cmp eax, ebx
je 0x10018322
push eax
call fcn.1001283a
pop ecx
test eax, eax
je 0x10018322
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x10018322
mov eax, dword [0x10021e00]
cmp eax, ebx
je 0x10018322
push eax
call fcn.1001283a
pop ecx
test eax, eax
je 0x10018322
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x10021df8]
call fcn.1001283a
pop ecx
test eax, eax
je 0x10018342
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x10018344
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4ad1d8
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x483248
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebp
push edi
mov edi, ecx
xor ebp, ebp
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x48]
push ebp
push eax
push ecx
lea ecx, reloc.RASAPI32.dll_RasHangUpA
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
call fcn.004a80d8
test eax, eax
jne 0x4ad244
push ebp
push 0x4bdf98
mov ecx, edi
call fcn.004ac458
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
pop edi
pop ebp
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 0x10
mov edx, dword [esp + 0x48]
push ebx
mov ebx, dword [esp + 0x50]
push esi
push ebp
push ebp
push ebx
lea ecx, [edx + 0x14]
call fcn.004a7b08
lea ecx, [esp + 0x2c]
mov esi, eax
call fcn.0049f0c8
push ebx
mov dword [esp + 0x4c], ebp
call fcn.004a8288
add esp, 4
test eax, eax
je 0x4ad2e7
add esi, 0x18
push esi
call fcn.0049fac8
add esi, eax
push esi
call fcn.0049fac8
mov ecx, dword [esp + 0x60]
add esp, 8
cmp ecx, 3
lea eax, [esi + eax + 8]
ja 0x4ad5ea
jmp dword [ecx*4 + 0x41b2b0]
mov eax, dword [esi]
push ebp
push eax
mov ecx, edi
call fcn.004ac598
mov ebx, dword [esp + 0x58]
mov ebp, eax
lea edi, [esi + 0x18]
mov edx, dword [ebp + 0x28]
lea ecx, [ebx + ebx*4]
mov esi, edi
lea eax, [edx + ecx*4]
push esi
mov dword [esp + 0x5c], eax
call fcn.0049fac8
add esi, eax
push esi
call fcn.0049fac8
add esi, eax
add esp, 8
mov esi, dword [esi]
test esi, esi
je 0x4ad338
mov ecx, dword [esi + 0x1c]
push ecx
call dword [fcn.0048754c]
test eax, eax
je 0x4ad338
mov eax, 1
jmp 0x4ad33a
xor eax, eax
cmp ebx, 8
jge 0x4ad59f
cmp ebx, 7
ja 0x4ad5ea
jmp dword [ebx*4 + 0x41b2c0]
test eax, eax
jne 0x4ad5b2
mov ecx, dword [esp + 0x10]
push eax
push 0x4bdf84
call fcn.004ac458
push 6
call dword [ebp + 0x2c]
lea edx, [esp + 0x1c]
xor ecx, ecx
add ebx, 0xfffffff8
push edx
mov dword [esp + 0x20], ecx
push ebx
push esi
mov dword [esp + 0x2c], ecx
call eax
mov edx, dword [esp + 0x5c]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
call fcn.004adaf8
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x2c]
mov esi, eax
mov dword [esp + 0x48], reloc.RASAPI32.dll_RasHangUpA
mov dword [esp + 0x2c], 0x4a8948
call fcn.0049f2c8
mov ecx, dword [esp + 0x40]
mov eax, esi
pop esi
mov edx, edi
pop ebx
pop edi
pop ebp
mov dword fs:[0], ecx
add esp, 0x3c
ret 0x10
Function at 0x4b6268
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x4e0668]
xor edx, edx
cmp eax, edx
jne 0x4b628e
xor eax, eax
mov byte [eax + 0x4e0568], al
inc eax
cmp eax, 0x100
jl 0x4b6276
mov dword [0x4e0668], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x4e0568
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x4b631f
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x4b62f2
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x4b62c0
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x4b6398
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x4b63eb
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x4b63d2
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4ba688
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x68
mov eax, dword [esp + 0x78]
push ebx
push esi
cmp eax, 1
push edi
mov dword [esp + 0x14], ecx
jl 0x4ba8a9
cmp eax, 8
jg 0x4ba8a9
cmp dword [esp + 0x8c], 2
jl 0x4ba8a9
mov eax, dword [esp + 0x7c]
mov esi, dword [eax]
mov edi, dword [eax + 4]
mov ecx, dword [eax + 8]
mov dword [esp + 0x6c], ecx
sub ecx, esi
mov ebx, dword [eax + 0xc]
mov dword [esp + 0x7c], ecx
test ecx, ecx
mov dword [esp + 0x70], ebx
jle 0x4ba8a9
sub ebx, edi
test ebx, ebx
mov dword [esp + 0x20], ebx
jle 0x4ba8a9
mov eax, dword [esp + 0x80]
test eax, eax
je 0x4ba70f
mov edx, dword [eax]
mov dword [esp + 0x44], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x48], edx
mov edx, dword [eax + 8]
mov dword [esp + 0x4c], edx
mov eax, dword [eax + 0xc]
mov dword [esp + 0x50], eax
xor edx, edx
push ebp
test ebx, ebx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x14], edx
jle 0x4ba892
mov ebp, dword [fcn.004874d0]
mov eax, ebx
mov dword [esp + 0x10], 0x32
sub eax, edx
cmp eax, 0x32
jg 0x4ba741
mov dword [esp + 0x10], eax
xor eax, eax
test ecx, ecx
jle 0x4ba879
mov ebx, dword [esp + 0x10]
add ebx, edx
mov dword [esp + 0x20], ebx
sub ecx, eax
cmp ecx, 0x32
jle 0x4ba761
mov ecx, 0x32
lea ebx, [ecx + eax]
mov ecx, dword [esp + 0x20]
push ecx
push ebx
push edx
lea edx, [esp + 0x34]
push eax
push edx
call dword [fcn.004874c0]
push edi
lea eax, [esp + 0x2c]
push esi
push eax
call ebp
mov eax, dword [esp + 0x84]
test eax, eax
je 0x4ba7a0
lea ecx, [esp + 0x48]
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
call dword [fcn.004874c4]
lea ecx, [esp + 0x28]
push ecx
call dword [fcn.00487510]
test eax, eax
jne 0x4ba860
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x40], ecx
mov eax, edi
mov ecx, esi
mov dword [esp + 0x44], edx
neg eax
neg ecx
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
call ebp
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x60], edx
lea edx, [esp + 0x58]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x94]
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x94]
sub ecx, edi
sub eax, esi
push edx
push ecx
mov ecx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x9c]
push eax
call fcn.004b9c98
cmp eax, 1
jne 0x4ba88a
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x80]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x28]
call fcn.004ba548
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x14]
mov eax, ebx
cmp eax, ecx
jl 0x4ba755
mov ebx, dword [esp + 0x24]
add edx, dword [esp + 0x10]
cmp edx, ebx
mov dword [esp + 0x14], edx
jge 0x4ba892
jmp 0x4ba72c
mov dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x18]
call fcn.004b9898
mov eax, dword [esp + 0x1c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x68
ret 0x1c
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x68
ret 0x1c
Function at 0x4bce28
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
xor esi, esi
xor ecx, ecx
mov si, word [eax + 8]
mov cx, word [eax + 4]
xor ebp, ebp
xor edx, edx
mov bp, word [eax + 0xa]
mov dx, word [eax + 6]
sub esi, ecx
sub ebp, edx
inc esi
xor ebx, ebx
inc ebp
cmp esi, ebx
mov dword [esp + 0x14], esi
jle 0x4bcfc0
cmp ebp, ebx
jle 0x4bcfc0
mov eax, esi
push edi
cdq
and edx, 7
add eax, edx
mov edi, eax
mov eax, esi
sar edi, 3
and eax, 0x80000007
mov dword [esp + 0x10], edi
jns 0x4bce86
dec eax
or eax, 0xfffffff8
inc eax
je 0x4bce8d
inc edi
mov dword [esp + 0x10], edi
mov ecx, edi
and ecx, 0x80000001
jns 0x4bce9c
dec ecx
or ecx, 0xfffffffe
inc ecx
je 0x4bcea3
inc edi
mov dword [esp + 0x10], edi
push 0x18
call fcn.00509a22
add esp, 4
cmp eax, ebx
je 0x4bcec4
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], ebx
mov ebx, eax
mov eax, edi
mov dword [esp + 0x14], ebx
imul eax, ebp
push eax
mov dword [ebx], 7
mov dword [ebx + 4], esi
mov dword [ebx + 8], ebp
mov dword [ebx + 0x14], eax
call fcn.00509a22
mov ecx, dword [ebx + 0x14]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebx + 0x10], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x2c]
test ebp, ebp
lea edx, [eax + 0x80]
jle 0x4bcfb6
xor eax, eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], eax
mov ebp, dword [ebx + 0x10]
xor ecx, ecx
add ebp, eax
mov dword [esp + 0x2c], ecx
test esi, esi
jle 0x4bcf9d
mov al, byte [edx]
cmp al, 0xc0
jbe 0x4bcf89
and eax, 0xff
sub eax, 0xc0
inc edx
mov esi, eax
mov dword [esp + 0x24], edx
cmp esi, 1
jle 0x4bcf7e
xor eax, eax
mov ecx, esi
mov al, byte [edx]
mov edx, ecx
mov bl, al
mov edi, ebp
mov bh, bl
dec esi
mov eax, ebx
shl eax, 0x10
mov ax, bx
mov ebx, dword [esp + 0x14]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x24]
and ecx, 3
add ebp, esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x2c]
lea ecx, [eax + esi*8]
mov esi, dword [esp + 0x18]
jmp 0x4bcf8c
mov al, byte [edx]
mov esi, dword [esp + 0x18]
mov byte [ebp], al
jmp 0x4bcf8c
mov byte [ebp], al
inc ebp
add ecx, 8
inc edx
cmp ecx, esi
mov dword [esp + 0x2c], ecx
jl 0x4bcf28
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
add eax, edi
dec ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jne 0x4bcf19
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x18
ret
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret