joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10010812
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x100190f4]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x10010843
xor eax, eax
jmp 0x100109cc
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x1001b3a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x1001087f
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.100129fe
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x1001095a
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x10010998
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x100108e3
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x100108d4
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x100108b4
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10010923
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x1001092c
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x100108a5
jmp 0x1001092e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x100109c7
cmp dword [ebp - 0x6c], edi
je 0x10010998
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x1001098d
call fcn.1000e9f3
mov dword [eax], 9
call fcn.1000e9fc
mov dword [eax], esi
jmp 0x100109c2
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10010982
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x1001092e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x1001092e
push dword [ebp - 0x6c]
call fcn.1000ea05
pop ecx
jmp 0x100109c2
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x100109b0
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x100109b0
xor eax, eax
jmp 0x100109ca
call fcn.1000e9f3
mov dword [eax], 0x1c
call fcn.1000e9fc
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x100109ca
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.1000b2da
add ebp, 0x3a0
leave
ret
Function at 0x10011686
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x1001a244], ebx
push esi
push edi
jne 0x10011706
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x10011741
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x1001a244], eax
je 0x10011741
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x1001a248], eax
call esi
cmp dword [0x1001a0b4], 2
mov dword [0x1001a24c], eax
jne 0x10011706
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x1001a254], eax
je 0x10011706
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x1001a250], eax
mov eax, dword [0x1001a250]
test eax, eax
je 0x1001174b
call eax
test eax, eax
je 0x10011732
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x1001a254]
test eax, eax
je 0x10011732
test byte [ebp - 8], 1
jne 0x1001174b
cmp dword [0x1001a0c0], 4
jb 0x10011745
or byte [ebp + 0x12], 0x20
jmp 0x1001176a
xor eax, eax
jmp 0x1001177a
or byte [ebp + 0x12], 4
jmp 0x1001176a
mov eax, dword [0x1001a248]
test eax, eax
je 0x1001176a
call eax
mov ebx, eax
test ebx, ebx
je 0x1001176a
mov eax, dword [0x1001a24c]
test eax, eax
je 0x1001176a
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x1001a244]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10011c4f
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.1000c220
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10011cea
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x1001a0b4]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x10011cea
cmp eax, 1
je 0x10011d0b
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10011cea
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x10011cb7
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x10011ce6
xor eax, eax
inc eax
jmp 0x10011d2a
cmp edi, eax
jae 0x10011cee
xor eax, eax
jmp 0x10011d2a
cmp eax, esi
jae 0x10011cf5
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x1001a0b4]
jmp 0x10011d0e
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1001316c
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.1000c220
mov eax, dword [0x100190f4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.1001289b
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x1001329f
push 2
push esi
push dword [ebp + 8]
call fcn.1001289b
add esp, 0xc
cmp eax, ebx
je 0x1001329f
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x1001323f
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.1000b4c0
push 0x8000
push dword [ebp + 8]
call fcn.10013b21
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x100131f5
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.10010812
add esp, 0xc
cmp eax, 0xffffffff
je 0x10013215
sub edi, eax
test edi, edi
jg 0x100131ed
jmp 0x1001322d
call fcn.1000e9fc
cmp dword [eax], 5
jne 0x1001322a
call fcn.1000e9f3
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.10013b21
pop ecx
pop ecx
jmp 0x10013287
jge 0x10013287
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1001289b
push dword [ebp + 8]
call fcn.1001249b
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x10013287
call fcn.1000e9f3
mov dword [eax], 0xd
call fcn.1000e9fc
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.1001289b
add esp, 0xc
mov eax, esi
pop edi
jmp 0x100132a1
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.1000b2da
leave
ret
Function at 0x100132ad
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x10013481
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x1001b3a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x10013481
test cl, 0x48
je 0x10013318
cmp byte [eax + 5], 0xa
je 0x10013318
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1001336a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x10013352
call fcn.1000e9f3
mov dword [eax], 9
call fcn.1000e9fc
mov dword [eax], esi
jmp 0x10013362
cmp eax, 0x6d
je 0x10013481
push eax
call fcn.1000ea05
pop ecx
or eax, 0xffffffff
jmp 0x10013483
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x1001347c
test eax, eax
je 0x10013391
cmp byte [ebx], 0xa
jne 0x10013391
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x1001339a
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x10013476
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x10013466
cmp al, 0xd
je 0x100133cc
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x10013458
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x100133e6
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x100133e1
add dword [ebp + 0x10], 2
jmp 0x1001343a
mov dword [ebp + 0x10], eax
jmp 0x10013454
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1001340e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10013454
cmp dword [ebp - 0xc], 0
je 0x10013454
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x1001342f
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x1001343a
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x10013457
cmp ebx, dword [ebp + 0xc]
jne 0x1001343f
cmp byte [ebp - 1], 0xa
jne 0x1001343f
mov byte [ebx], 0xa
jmp 0x10013457
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1001289b
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x10013458
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x100133b0
jmp 0x10013476
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x10013476
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x10013483
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100138d6
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x100138ef
or eax, 0xffffffff
jmp 0x10013950
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x1001394c
push 0x3d
push esi
call fcn.1000c355
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x1001394c
cmp esi, eax
je 0x1001394c
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x1001a0d4]
sete cl
cmp eax, dword [0x1001a0d8]
mov dword [ebp - 8], ecx
jne 0x10013932
mov edi, eax
call fcn.10013875
mov dword [0x1001a0d4], eax
cmp eax, ebx
jne 0x1001398b
cmp dword [ebp + 0xc], ebx
je 0x10013954
cmp dword [0x1001a0dc], ebx
je 0x10013954
call fcn.10012e0b
test eax, eax
je 0x1001398b
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x1001395d
xor eax, eax
jmp 0x1001394f
push 4
call fcn.1000be6d
cmp eax, ebx
pop ecx
mov dword [0x1001a0d4], eax
je 0x1001394c
mov dword [eax], ebx
cmp dword [0x1001a0dc], ebx
jne 0x1001398b
push 4
call fcn.1000be6d
cmp eax, ebx
pop ecx
mov dword [0x1001a0dc], eax
je 0x1001394c
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x1001a0d4]
call fcn.10013828
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x100139ec
cmp dword [esi], ebx
je 0x100139ec
lea esi, [esi + edi*4]
push dword [esi]
call fcn.1000bba8
cmp dword [ebp - 8], ebx
pop ecx
jne 0x100139cf
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x10013a2d
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x100139c6
mov eax, edi
shl eax, 2
push eax
push dword [0x1001a0d4]
call fcn.1000bc19
cmp eax, ebx
pop ecx
pop ecx
je 0x10013a2d
jmp 0x10013a28
cmp dword [ebp - 8], ebx
jne 0x10013a98
cmp edi, ebx
jge 0x100139fb
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x1001a0d4]
call fcn.1000bc19
cmp eax, ebx
pop ecx
pop ecx
je 0x1001394c
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x1001a0d4], eax
cmp dword [ebp + 0xc], ebx
je 0x10013a82
push dword [ebp - 4]
call fcn.1000a670
inc eax
inc eax
push eax
call fcn.1000be6d
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x10013a82
push dword [ebp - 4]
push esi
call fcn.1000b3c0
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x10013a7b
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.1000bba8
pop ecx
cmp dword [ebp - 8], ebx
je 0x10013a90
push dword [ebp - 4]
call fcn.1000bba8
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x1001394f
push dword [ebp - 4]
call fcn.1000bba8
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x10013959
Function at 0x4059a6
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
test edi, edi
pop ecx
mov esi, eax
jbe 0x4059d1
mov eax, dword [esp + 0xc]
push ebx
mov ecx, esi
sub eax, esi
mov edx, edi
mov bl, byte [eax + ecx]
xor bl, 0x42
mov byte [ecx], bl
inc ecx
dec edx
jne 0x4059c4
pop ebx
push 0x408230
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push edi
push esi
call fcn.00404b97
push esi
mov edi, eax
call fcn.00405a0a
add esp, 0x18
mov eax, edi
pop edi
pop esi
ret 0x10

Function at 0x418180
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x12000]
push edi
or ebp, 0xffffffff
jmp 0x4181a2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4181a9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x418198
mov eax, 1
add ebx, ebx
jne 0x4181bb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4181b0
jne 0x4181cc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4181b0
xor ecx, ecx
sub eax, 3
jb 0x4181e0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x418252
mov ebp, eax
add ebx, ebx
jne 0x4181eb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4181f8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x41821c
inc ecx
add ebx, ebx
jne 0x418208
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4181fd
jne 0x418219
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4181fd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x41823c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x41822d
jmp 0x41819e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x41823c
add edi, ecx
jmp 0x41819e
pop esi
mov edi, esi
mov ecx, 0x3b2
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x41825a
cmp byte [edi], 0
jne 0x41825a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x41825f
lea edi, [esi + 0x16000]
mov eax, dword [edi]
or eax, eax
je 0x4182ce
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x180b0]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x18114]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x41828c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x18118]
or eax, eax
je 0x4182c8
mov dword [ebx], eax
add ebx, 4
jmp 0x4182a9
call dword [esi + 0x1811c]
popal
jmp 0x40a630
Function at 0x4018a3
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Hide graphical window
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov eax, dword [sym.imp.KERNEL32.dll_AllocConsole]
call eax
mov dword [esp + 4], 0
mov dword [esp], str.ConsoleWindowClass
mov eax, dword [sym.imp.USER32.dll_FindWindowA]
call eax
sub esp, 8
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
sub esp, 8
mov dword [0x406048], 0x404066
mov word [0x40604c], 0x1bb
lea eax, [ebp - 0x1a8]
mov dword [esp + 4], eax
mov dword [esp], 2
mov eax, dword [sym.imp.WSOCK32.DLL_WSAStartup]
call eax
sub esp, 8
test eax, eax
je 0x40191f
mov dword [esp], 1
call sym._exit
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WSOCK32.DLL_socket]
call eax
sub esp, 0xc
mov dword [0x406044], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x18]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x18], 2
mov eax, dword [0x406048]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x14], eax
movzx eax, word [0x40604c]
movzx eax, ax
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_htons]
call eax
sub esp, 4
mov word [ebp - 0x16], ax
mov dword [esp], 3
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Success_
mov dword [esp + 4], str.Hello_fellow_analyst_
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_MessageBoxA]
call eax
sub esp, 0x10
mov dword [esp], 0
call sym._exit
nop
nop

Function at 0x401c50
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]
Function at 0x401cb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406084]
test esi, esi
jle 0x401dd0
mov eax, dword [0x406088]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x401ce4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401d67
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401cd0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401df7
mov eax, dword [0x406088]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x406088]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401dd7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401d60
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401d70
add dword [0x406084], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x406088]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401d60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x401cee
mov eax, dword [0x406088]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop

Function at 0x4022b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4060a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x406098]
sub esp, 4
test ebx, ebx
je 0x402305
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4022fe
test esi, esi
je 0x4022fe
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4022e0
mov dword [esp], 0x4060a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402630
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402655
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402660
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402655
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test esi, esi
je 0x4026a8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40269e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4026aa
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402690
xor eax, eax
pop ebx
pop esi
ret