joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100010e0
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push ebx
mov ebx, dword [eax + 4]
mov eax, dword [eax]
movzx ecx, word [eax + 0x14]
xor edx, edx
push esi
lea esi, [ecx + eax + 0x18]
mov dword [esp + 8], 0
cmp dx, word [eax + 6]
jae 0x10001189
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
add esi, 0x10
cmp dword [esi], 0
jne 0x10001141
mov eax, dword [esp + 0x1c]
mov edi, dword [eax + 0x38]
test edi, edi
jle 0x1000116d
mov ecx, dword [esi - 4]
push 4
push 0x1000
push edi
add ecx, ebx
push ecx
call ebp
push edi
push 0
push eax
mov dword [esi - 8], eax
call fcn.10003480
jmp 0x1000116a
nop
mov edx, dword [esi]
mov eax, dword [esi - 4]
push 4
push 0x1000
push edx
add eax, ebx
push eax
call ebp
mov edx, dword [esi + 4]
mov ecx, dword [esi]
add edx, dword [esp + 0x18]
push ecx
mov edi, eax
push edx
push edi
call fcn.10003110
mov dword [esi - 8], edi
add esp, 0xc
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov eax, dword [esp + 0x10]
movzx ecx, word [edx + 6]
inc eax
add esi, 0x28
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x10001113
pop edi
pop ebp
pop esi
pop ebx
pop ecx
ret

Function at 0x100011c0
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [eax]
movzx ecx, word [ebx + 0x14]
push ebp
xor edx, edx
xor ebp, ebp
lea eax, [ecx + ebx + 0x18]
cmp dx, word [ebx + 6]
jae 0x10001277
push esi
push edi
lea edi, [eax + 0x24]
mov eax, dword [edi]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x10001217
mov eax, dword [edi - 0x14]
mov ecx, dword [edi - 0x1c]
push 0x4000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1000125f
lea edx, [edx + ecx*2]
lea ecx, [esi + edx*2]
mov esi, dword [ecx*4 + section..data]
test eax, 0x4000000
je 0x10001231
or esi, 0x200
mov edx, dword [edi - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x1000124c
test al, 0x40
je 0x10001243
mov ecx, dword [ebx + 0x20]
jmp 0x1000124a
test al, al
jns 0x1000125f
mov ecx, dword [ebx + 0x24]
test ecx, ecx
jbe 0x1000125f
mov ecx, dword [edi - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [esp + 0x18]
mov ebx, dword [edx]
movzx eax, word [ebx + 6]
inc ebp
add edi, 0x28
cmp ebp, eax
jl 0x100011e4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x10002280
Capabilities:
Enumerate process modules

Disassembly:
jmp 0x10002280
sub esp, 0x228
mov eax, dword [0x1002a040]
xor eax, esp
mov dword [esp + 0x224], eax
push esi
mov esi, dword [esp + 0x230]
push edi
push 0
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
je 0x100022cb
lea eax, [esp + 8]
push eax
push edi
mov dword [esp + 0x10], 0x224
call sub.KERNEL32.dll_Module32First
test eax, eax
jne 0x100022e4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x224]
xor ecx, esp
call fcn.10003586
add esp, 0x228
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x30]
push ecx
call ebx
cmp eax, esi
jne 0x10002300
push esi
call ebp
lea edx, [esp + 0x10]
push edx
push edi
call sub.KERNEL32.dll_Module32Next
test eax, eax
jne 0x100022f2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x234]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.10003586
add esp, 0x228
ret

Function at 0x10003586
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1002a040]
jne 0x10003590
repz ret
jmp fcn.1000424e
Function at 0x100117ba
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.10005c6c
and dword [ebp - 4], 0
cmp dword [0x1002bc7c], 0
mov ebx, eax
jne 0x1001186b
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1001191c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x1001191c
push eax
call fcn.10005bfa
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x1002bc7c], eax
call esi
push eax
call fcn.10005bfa
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x1002bc80], eax
call esi
push eax
call fcn.10005bfa
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x1002bc84], eax
call esi
push eax
call fcn.10005bfa
pop ecx
mov dword [0x1002bc8c], eax
test eax, eax
je 0x1001186b
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.10005bfa
pop ecx
mov dword [0x1002bc88], eax
mov eax, dword [0x1002bc88]
cmp eax, ebx
je 0x100118c3
cmp dword [0x1002bc8c], ebx
je 0x100118c3
push eax
call fcn.10005c75
push dword [0x1002bc8c]
mov esi, eax
call fcn.10005c75
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x100118c3
test edi, edi
je 0x100118c3
call esi
test eax, eax
je 0x100118ba
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x100118ba
test byte [ebp - 0xc], 1
jne 0x100118c3
or dword [ebp + 0x10], 0x200000
jmp 0x100118fc
mov eax, dword [0x1002bc80]
cmp eax, ebx
je 0x100118fc
push eax
call fcn.10005c75
pop ecx
test eax, eax
je 0x100118fc
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x100118fc
mov eax, dword [0x1002bc84]
cmp eax, ebx
je 0x100118fc
push eax
call fcn.10005c75
pop ecx
test eax, eax
je 0x100118fc
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x1002bc7c]
call fcn.10005c75
pop ecx
test eax, eax
je 0x1001191c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x1001191e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

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 0x403bf6
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
je 0x403c0e
push dword [esp + 4]
push 0x403b8f
call dword [sym.imp.USER32.dll_EnumWindows]
jmp 0x403c4b
push esi
mov esi, dword [0x481b00]
test esi, esi
je 0x403c4a
push ebx
push edi
mov ebx, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x403c42
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
push edi
push 0x481b00
call fcn.00404dda
pop ecx
pop ecx
test ebx, ebx
mov esi, ebx
jne 0x403c1b
pop edi
pop ebx
pop esi
ret 4
Function at 0x4043b0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
cmp dword [esi + 0x14], eax
mov dword [esp + 4], eax
jne 0x4043e5
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4

Function at 0x404670
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x481b64]
push ebx
push esi
push edi
push eax
or edi, 0xffffffff
push ecx
or ebx, edi
call fcn.00404c1e
mov esi, eax
test esi, esi
je 0x4046ca
mov eax, dword [esi]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, dword [esp + 0x10]
xor edi, edi
xor edx, edx
or ecx, edx
or edi, eax
cmp dword [esi + 4], edx
je 0x4046c0
cmp dword [esi + 0x14], edx
jne 0x4046c0
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
cdq
add ecx, eax
adc edi, edx
mov edx, edi
pop edi
pop esi
mov eax, ecx
pop ebx
ret 4
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
ret 4

Function at 0x4046e0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x481b64]
push eax
push ecx
mov byte [esp + 0xb], 0
call fcn.00404c1e
test eax, eax
je 0x40472a
cmp dword [eax + 4], 0
lea edx, [esp + 3]
je 0x404717
push 1
push edx
push eax
call fcn.004049a0
movzx eax, byte [esp + 3]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, byte [esp + 3]
pop ecx
ret 4

Function at 0x404740
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x481b64]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.00404c1e
test eax, eax
je 0x40478a
cmp dword [eax + 4], 0
lea edx, [esp]
je 0x404777
push 4
push edx
push eax
call fcn.004049a0
mov eax, dword [esp]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret 4

Function at 0x4047a0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x481b64]
push eax
push ecx
mov byte [esp + 0xb], 0
call fcn.00404c1e
test eax, eax
je 0x4047ea
cmp dword [eax + 4], 0
lea edx, [esp + 3]
je 0x4047d7
push 1
push edx
push eax
call fcn.004049a0
movsx eax, byte [esp + 3]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, byte [esp + 3]
pop ecx
ret 4
Function at 0x404800
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
test edi, edi
mov dword [esp + 4], eax
je 0x404859
push esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x404858
mov eax, dword [esp + 0x10]
mov ecx, dword [0x481b64]
push eax
push ecx
call fcn.00404c1e
test eax, eax
je 0x404854
cmp dword [eax + 4], 0
je 0x404842
push esi
push edi
push eax
call fcn.00404ad0
pop esi
pop edi
pop ecx
ret 0xc
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop esi
pop edi
pop ecx
ret 0xc

Function at 0x404860
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x14]
push ebx
push ebp
push edi
push eax
push 0x1000
mov dword [esp + 0x1c], 0x1000
call fcn.004050b0
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x481b64]
push ecx
mov edi, eax
push edx
mov ebp, edi
call fcn.00404c1e
mov ebx, eax
test ebx, ebx
je 0x40497e
push esi
lea ecx, [ecx]
mov byte [esp + 0x13], 0
cmp dword [ebx + 4], 0
je 0x4048be
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.004049a0
mov dword [esp + 0x14], eax
jmp 0x4048d5
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [esp + 0x13]
test al, al
je 0x4048e7
mov byte [ebp], al
mov al, byte [esp + 0x13]
add ebp, 1
mov ecx, dword [esp + 0x18]
mov esi, ebp
sub esi, edi
cmp esi, ecx
jl 0x404911
mov edx, dword [esp + 0x24]
add ecx, 0x1000
push edx
push ecx
mov dword [esp + 0x20], ecx
call fcn.004050b0
mov edi, eax
mov al, byte [esp + 0x13]
lea ebp, [esi + edi]
test al, al
je 0x40497d
cmp dword [esp + 0x14], 0
je 0x404928
cmp al, 0xd
je 0x404928
cmp al, 0xa
jne 0x4048a0
sub ebp, 1
cmp al, 0xd
jne 0x40497d
cmp dword [ebx + 4], 0
je 0x404944
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.004049a0
jmp 0x40495b
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40497d
cmp dword [ebx + 4], 0
je 0x40496e
add dword [ebx + 0xc], 1
jmp 0x40497d
mov ecx, dword [ebx]
push 1
push 0
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop esi
sub edi, ebp
add edi, dword [esp + 0x14]
mov byte [ebp], 0
push edi
call fcn.00405130
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 8
Function at 0x1005ca8
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 8
push dword [ebp + 0xc]
xor ebx, ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebx
jne 0x1005ceb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010046fc
push eax
push esi
push 0x1001674
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
jmp 0x1005dd7
cmp dword [ebp + 0x10], ebx
jbe 0x1005d2a
push dword [ebp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
jne 0x1005d2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010046fc
push eax
push esi
push 0x1002b44
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1005dd7
xor esi, esi
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
push dword [ebp + 0x10]
push esi
push 3
push edi
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
jne 0x1005d73
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1005d73
cmp eax, 0xea
je 0x1005d73
push eax
call fcn.010046fc
push eax
push dword [ebp - 4]
push 0x1002b18
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
jmp 0x1005dcc
push dword [ebp + 0xc]
mov ebx, dword [sym.imp.msvcrt.dll_printf]
push 0x1002afc
call ebx
cmp dword [ebp + 0xc], 0
pop ecx
pop ecx
jbe 0x1005db7
xor edi, edi
cmp dword [ebp + 0xc], edi
jbe 0x1005db1
lea eax, [esi + 8]
push 1
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push dword [esi + 4]
push dword [esi]
call fcn.01004722
add esi, 0x24
inc edi
cmp edi, dword [ebp + 0xc]
jb 0x1005d92
inc edi
cmp edi, dword [ebp + 0xc]
jb 0x1005d8b
cmp dword [ebp - 4], 0xea
jne 0x1005dcc
push dword [ebp + 8]
push 0x1002adc
call ebx
pop ecx
pop ecx
test esi, esi
je 0x1005dd7
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x1007492
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x28
push 0x10046d8
call fcn.01007630
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x10074cd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10074cd
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x10074e5
cmp eax, 0x20b
je 0x10074d2
mov dword [ebp - 0x1c], edi
jmp 0x10074f9
cmp dword [ecx + 0x84], 0xe
jbe 0x10074cd
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x10074f3
cmp dword [ecx + 0x74], 0xe
jbe 0x10074cd
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 1
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x1008840], 0xffffffff
or dword [0x1008844], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x100802c]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x1008028]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x1008848], eax
call fcn.0100762a
cmp dword [section..data], edi
jne 0x1007554
push fcn.0100762a
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.01007618
push 0x10010fc
push 0x10010f8
call sub.msvcrt.dll__initterm
mov eax, dword [0x1008024]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push dword [0x1008020]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.msvcrt.dll___wgetmainargs]
mov dword [ebp - 0x30], eax
push 0x10010f4
push 0x10010f0
call sub.msvcrt.dll__initterm
mov eax, dword [ebp - 0x24]
mov ecx, dword [sym.imp.msvcrt.dll___winitenv]
mov dword [ecx], eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.010061e3
add esp, 0x30
mov esi, eax
mov dword [ebp - 0x34], esi
cmp dword [ebp - 0x1c], edi
jne 0x10075cb
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
jmp 0x1007600
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.01007669
ret
Function at 0x802690
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x80400c]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x802728
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x802708
xor eax, eax
push ebp
push 0x802701
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x802744
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x802708
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x80400c]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x80400c], ax
mov esp, ebp
pop ebp
ret

Function at 0x802df8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x805034], 0
je 0x802e59
cmp word [0x805208], 0xd7b2
jne 0x802e21
cmp dword [0x805210], 0
jbe 0x802e21
mov eax, 0x805204
call dword [0x805220]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x804054
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x802e80
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x804018], 0
jne 0x802e75
push 0
push 0x80404c
push 0x804054
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x8030f0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x803156
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00802ff4
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00802584
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x803140
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x80315d
lea eax, [ebp - 0x10]
call fcn.00802f74
ret
Function at 0x401440
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push 0xffffffffffffffff
push 0x406bcb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x198
lea eax, [esp + 8]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
lea ecx, [esp]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 4]
mov dword [esp + 0x1a0], 0
push ecx
push 0x10
lea ecx, [esp + 8]
mov dword [esp + 0xc], 0x10
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push 0xffffffffffffffff
lea ecx, [esp + 4]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov edx, dword [esp]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4014ed
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x4014ed
push esi
mov esi, dword [eax]
lea ecx, [esp + 4]
mov dword [esp + 0x1a4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
pop esi
mov ecx, dword [esp + 0x198]
mov dword fs:[0], ecx
add esp, 0x1a4
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea ecx, [esp]
mov dword [esp + 0x1a0], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x198]
xor eax, eax
mov dword fs:[0], ecx
add esp, 0x1a4
ret
Function at 0x4021f0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x114
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
call sub.MFC42.DLL_AfxSocketInit
test eax, eax
jne 0x402211
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov edi, 0x738d00
or ecx, 0xffffffff
xor eax, eax
push pe_nt_image_headers32
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x130]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x738d00
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x28]
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x12c]
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.WS2_32.dll_gethostname
test eax, eax
je 0x40227f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
lea ecx, [esp + 0x24]
push ecx
call sub.WS2_32.dll_gethostbyname
mov ebp, eax
test ebp, ebp
jne 0x4022a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
je 0x4022ed
mov eax, dword [esp + 0x10]
xor esi, esi
movsx ecx, word [ebp + 0xa]
mov esi, dword [edx + esi]
mov edx, ecx
lea edi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp ebx, dword [esp + 0x134]
jne 0x4022da
mov eax, dword [esp + 0x18]
push eax
call sub.WS2_32.dll_inet_ntoa
mov edx, dword [ebp + 0xc]
inc ebx
lea esi, [ebx*4]
cmp dword [esi + edx], 0
jne 0x4022ae
jmp 0x4022f1
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x130]
test ecx, ecx
je 0x4022fe
mov dword [ecx], ebx
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x12c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x128]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret