joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bdcd0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xb8000]
push edi
jmp 0x4bdcea
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4bdcf1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4bdce0
mov eax, 1
add ebx, ebx
jne 0x4bdd03
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4bdcf8
jne 0x4bdd14
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4bdcf8
xor ecx, ecx
sub eax, 3
jb 0x4bdd28
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4bdd9a
mov ebp, eax
add ebx, ebx
jne 0x4bdd33
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4bdd40
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4bdd64
inc ecx
add ebx, ebx
jne 0x4bdd50
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4bdd45
jne 0x4bdd61
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4bdd45
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4bdd84
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4bdd75
jmp 0x4bdce6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4bdd84
add edi, ecx
jmp 0x4bdce6
pop esi
mov edi, esi
mov ecx, 0x6600
jmp 0x4bddd5
mov al, byte [edi]
inc edi
cmp al, 0x80
jb 0x4bddb5
cmp al, 0x8f
ja 0x4bddb5
cmp byte [edi - 2], 0xf
je 0x4bddbb
sub al, 0xe8
cmp al, 1
ja 0x4bdddf
cmp ecx, 4
jb 0x4bdde4
mov eax, dword [edi]
sub al, 1
jne 0x4bdddf
xchg ah, al
rol eax, 0x10
xchg ah, al
sub eax, edi
add eax, esi
sub ecx, 4
stosd dword es:[edi], eax
sub ecx, 1
jb 0x4bdde4
mov al, byte [edi]
inc edi
jmp 0x4bddb5
sub ecx, 1
jae 0x4bdda4
lea edi, [esi + 0xbb000]
mov eax, dword [edi]
or eax, eax
je 0x4bde35
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x12eba0]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x12ec58]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4bddea
mov ecx, edi
jns 0x4bde19
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 + 0x12ec60]
or eax, eax
je 0x4bde2f
mov dword [ebx], eax
add ebx, 4
jmp 0x4bde07
call dword [esi + 0x12ec5c]
mov ebp, dword [esi + 0x12ec64]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1f7]
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 0x4bde69
sub esp, 0xffffff80
jmp 0x4034a5
Function at 0x433002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x433072
mov ebx, 0x40de38
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0xa6e7349
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
loop 0x433060
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
je 0x4330d2
nop
nop
nop
nop
nop
mov ebx, 0x4304d8
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
push eax
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x7ac76824
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4330c0
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x401000
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp + 0xc]
push esi
push eax
lea eax, [ebp + 8]
push eax
call sym.ruby187g.exc_NtInitialize
pop ecx
pop ecx
call sym.ruby187g.exc_ruby_init
lea eax, [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call sym.ruby187g.exc_rb_w32_cmdvector
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 8], eax
add ecx, 4
dec eax
push ecx
push eax
call sym.ruby187g.exc_ruby_set_argv
push str.exerb
call fcn.004011d0
push 0x47e030
call sym.ruby187g.exc_rb_str_new2
push eax
push dword [sym.ruby187g.exc_rb_load_path]
call sym.ruby187g.exc_rb_ary_push
add esp, 0x20
lea eax, [ebp - 4]
xor esi, esi
push eax
mov dword [ebp - 4], esi
push dword [ebp + 0x10]
call sym.ruby187g.exc_rb_uint2inum
pop ecx
push eax
push 0x4010c4
call sym.ruby187g.exc_rb_protect
add esp, 0xc
cmp dword [ebp - 4], esi
je 0x4010b5
push dword [sym.ruby187g.exc_rb_eSystemExit]
mov esi, dword [sym.ruby187g.exc_ruby_errinfo]
push esi
call sym.ruby187g.exc_rb_obj_is_kind_of
pop ecx
test eax, eax
pop ecx
je 0x4010ad
push str.status
push esi
call sym.ruby187g.exc_rb_iv_get
pop ecx
mov esi, eax
pop ecx
sar esi, 1
jmp 0x4010b5
push esi
call dword [ebp + 0x14]
pop ecx
push 1
pop esi
call sym.ruby187g.exc_ruby_finalize
call fcn.004012df
mov eax, esi
pop esi
leave
ret

Function at 0x401933
Capabilities:
Allocate or change rwx memory
Delete file
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
cmp dword [0x488f68], 0x20
jbe 0x401955
push str.the_loaded_library_table_is_too_big.
push dword [sym.ruby187g.exc_rb_eExerbRuntimeError]
call sym.ruby187g.exc_rb_raise
push ebx
mov ebx, dword [ebp + 8]
push esi
lea eax, [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
and dword [ebp - 4], 0
and dword [ebp - 8], 0
push eax
push 4
push dword [ebp + 0xc]
push ebx
call esi
push ebx
call fcn.00401a28
pop ecx
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push dword [ebp + 0xc]
push ebx
call esi
mov al, byte [0x4890c4]
push 0x40
mov byte [ebp - 0x10c], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x10b]
rep stosd dword es:[edi], eax
push dword [ebp + 0xc]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x10c]
push ebx
push eax
push str.exerb
call fcn.00402d22
add esp, 0x10
lea eax, [ebp - 0x10c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
jne 0x4019ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call fcn.00402d92
pop ecx
mov eax, dword [0x488f68]
push dword [ebp + 0x10]
mov esi, eax
shl esi, 3
call fcn.00402b0b
inc dword [0x488f68]
cmp byte [ebp + 0x14], 0
mov dword [esi + 0x488f70], eax
pop ecx
mov dword [esi + 0x488f74], edi
jne 0x401a21
push edi
call fcn.00401f31
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401d80
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 4]
push esi
xor esi, esi
push edi
movzx eax, word [ecx + 0x14]
lea eax, [eax + ecx + 0x18]
movzx ecx, word [ecx + 6]
test ecx, ecx
jle 0x401db4
mov edx, dword [eax + 0xc]
cmp dword [esp + 0x10], edx
jb 0x401dac
mov edi, dword [eax + 8]
add edi, edx
cmp dword [esp + 0x10], edi
jb 0x401db6
inc esi
add eax, 0x28
cmp esi, ecx
jl 0x401d98
xor eax, eax
pop edi
pop esi
ret

Function at 0x402c3b
Capabilities:
Get file size

Disassembly:
push edi
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x402c6a
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0xc]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00402d92
pop ecx
pop esi
mov eax, edi
pop edi
ret

Function at 0x402d22
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov al, byte [0x4890c4]
push esi
push edi
push 0x40
mov byte [ebp - 0x104], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push 0
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push dword [ebp + 0xc]
call fcn.00402b68
push dword [ebp + 0x14]
mov esi, eax
push dword [ebp + 0x10]
push esi
call fcn.00402bfb
push esi
call fcn.00402b99
add esp, 0x14
pop edi
pop esi
leave
ret
Function at 0x403fb1
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
lea eax, [ebp - 4]
push esi
push eax
call sym.ruby187g.exc_Init_stack
mov eax, dword [sym.ruby187g.exc_ruby_frame]
xor esi, esi
mov dword [ebp - 0x24], eax
mov eax, dword [0x4891a0]
mov dword [ebp - 0x20], eax
mov eax, dword [0x489174]
mov dword [ebp - 0xc], eax
mov eax, dword [sym.ruby187g.exc_ruby_scope]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x64]
mov dword [0x489174], eax
lea eax, [ebp - 0x64]
push esi
push eax
mov dword [ebp - 0x18], 4
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
call sub.MSVCRT.dll__setjmp3
add esp, 0xc
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x404027
push dword [ebp + 0xc]
push dword [ebp + 8]
call sym.ruby187g.exc_ruby_process_options
mov eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov dword [0x489174], eax
pop esi
leave
ret
push eax
mov dword [0x4951e0], esi
mov dword [0x4951e4], esi
call fcn.00404041
pop ecx
push eax
call dword [sym.imp.MSVCRT.dll_exit]

Function at 0x40446f
Capabilities:
Terminate process

Disassembly:
cmp dword [sym.ruby187g.exc_ruby_nerrs], 0
jle 0x404480
push 1
call dword [sym.imp.MSVCRT.dll_exit]
call sym.ruby187g.exc_ruby_exec
test eax, eax
je 0x404497
cmp dword [0x489140], 0
jne 0x404497
mov dword [0x489140], eax
push dword [0x489140]
call sym.ruby187g.exc_ruby_stop

Function at 0x408931
Capabilities:
Terminate process

Disassembly:
cmp dword [0x489174], 0
je 0x408952
push 4
push 0x47f078
call sym.ruby187g.exc_rb_str_new
pop ecx
pop ecx
push eax
push dword [esp + 8]
call fcn.00408961
call sym.ruby187g.exc_ruby_finalize
push dword [esp + 4]
call dword [sym.imp.MSVCRT.dll_exit]

Function at 0x419650
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push ebx
push esi
push edi
lea esi, [eax + 0x40]
lea eax, [ebp - 0x200]
push 0x200
push eax
call fcn.0041950c
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, eax
push esi
push ebx
lea eax, [ebp - 0x200]
push 1
push eax
call edi
add esp, 0x18
cmp eax, ebx
je 0x4196ad
mov eax, dword [sym.imp.MSVCRT.dll__iob]
lea esi, [eax + 0x20]
lea eax, [ebp - 0x200]
push esi
push ebx
push 1
push eax
call edi
add esp, 0x10
cmp eax, ebx
jne 0x4196dc
push esi
push str._BUG_
call dword [sym.imp.MSVCRT.dll_fputs]
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
push esi
call dword [sym.imp.MSVCRT.dll_vfprintf]
push dword [sym.ruby187g.exc_ruby_description]
push str._n_s_n_n
push esi
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x20
jmp dword [sym.imp.MSVCRT.dll_abort]
Function at 0x41d0b4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
push dword [ebp + 0xc]
call sym.ruby187g.exc_rb_to_int
pop ecx
mov dword [ebp + 0xc], eax
test byte [ebp + 0xc], 1
je 0x41d0e1
mov eax, dword [ebp + 0xc]
sar eax, 1
push eax
call sym.ruby187g.exc_rb_int2big
pop ecx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
cmp byte [eax + 8], 0
jne 0x41d0ff
push dword [ebp + 0xc]
call sym.ruby187g.exc_rb_big_clone
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
call fcn.0041ad39
pop ecx
pop ecx
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x41d11d
push dword [ebp - 4]
call sym.ruby187g.exc_rb_big_clone
mov dword [ebp - 4], eax
push dword [ebp - 4]
call fcn.0041ad39
pop ecx
pop ecx
push ebx
push esi
push edi
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
cmp eax, dword [ecx + 0xc]
jle 0x41d14e
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0xc]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x10]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x10]
mov eax, dword [ebp + 0xc]
jmp 0x41d16c
mov eax, dword [ebp - 4]
mov edi, dword [eax + 0xc]
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
mov al, byte [eax + 8]
mov byte [ebp + 0xb], al
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
setne al
mov ecx, dword [ebp - 4]
mov byte [ecx + 8], al
mov eax, dword [ebp + 0xc]
cmp byte [eax + 8], 0
setne al
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 8], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
mov al, byte [eax + 8]
xor al, byte [ecx + 8]
neg al
sbb eax, eax
inc eax
push eax
push esi
push dword [sym.ruby187g.exc_rb_cBignum]
call fcn.0041acda
mov dword [ebp - 0xc], eax
mov eax, dword [eax + 0x10]
add esp, 0xc
xor ecx, ecx
test edi, edi
mov dword [ebp - 4], eax
jle 0x41d1e8
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ebp + 0xc], ebx
mov dword [ebp - 8], edi
sub dword [ebp + 0xc], eax
sub edx, eax
mov ecx, edi
mov edi, dword [ebp + 0xc]
mov edi, dword [edi + eax]
xor edi, dword [eax]
mov dword [edx + eax], edi
add eax, 4
dec dword [ebp - 8]
jne 0x41d1d5
cmp ecx, esi
jge 0x41d209
mov edx, dword [ebp - 4]
lea eax, [ebx + ecx*4]
sub edx, ebx
sub esi, ecx
cmp byte [ebp + 0xb], 0
mov ecx, dword [eax]
jne 0x41d200
not ecx
mov dword [edx + eax], ecx
add eax, 4
dec esi
jne 0x41d1f6
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
cmp byte [eax + 8], 0
jne 0x41d21c
push eax
call fcn.0041ad39
pop ecx
push dword [ebp - 0xc]
call fcn.0041adb6
pop ecx
leave
ret
Function at 0x428b62
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
mov dword [0x495264], edi
mov dword [0x495260], esi
push dword [esi]
call sym.ruby187g.exc_ruby_script
mov eax, dword [sym.ruby187g.exc_rb_progname]
push esi
push edi
mov dword [sym.ruby187g.exc_rb_argv0], eax
call fcn.00427c18
xor esi, esi
add esp, 0xc
cmp dword [0x495284], esi
je 0x428bb8
cmp dword [sym.ruby187g.exc_ruby_nerrs], esi
jne 0x428bb8
push str.Syntax_OK_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push esi
call dword [sym.imp.MSVCRT.dll_exit]
cmp dword [0x495280], esi
je 0x428bc5
call sym.ruby187g.exc_rb_parser_append_print
cmp dword [0x49527c], esi
je 0x428be0
push dword [0x49528c]
push dword [0x495288]
call sym.ruby187g.exc_rb_parser_while_loop
pop ecx
pop ecx
pop edi
pop esi
ret

Function at 0x428e94
Capabilities:
Accept command line arguments
Initialize winsock library

Disassembly:
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call sym.ruby187g.exc_rb_w32_cmdvector
pop ecx
pop ecx
mov ecx, dword [esp + 4]
mov dword [ecx], eax
call dword [sym.imp.MSVCRT.dll__tzset]
call fcn.00428f10
call fcn.0042a648
push 0x495540
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x428ed7
call fcn.00467e08
pop ecx
jmp fcn.0042aef3
Function at 0x428f10
Capabilities:
Get common file path
Get session user name
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push edi
mov edi, 0x104
lea eax, [ebp - 0x110]
push edi
push eax
push str.HOME
call esi
test eax, eax
jne 0x429039
lea eax, [ebp - 0x110]
push edi
push eax
push str.HOMEDRIVE
call esi
test eax, eax
je 0x428f60
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
jmp 0x428f62
xor eax, eax
mov ecx, edi
mov dword [ebp - 4], eax
sub ecx, eax
lea eax, [ebp + eax - 0x110]
push ecx
push eax
push str.HOMEPATH
call esi
test eax, eax
jne 0x428fde
cmp dword [ebp - 4], eax
jne 0x428fde
lea eax, [ebp - 0x110]
push edi
push eax
push str.USERPROFILE
call esi
test eax, eax
jne 0x428fe5
lea eax, [ebp - 8]
push eax
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x429039
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov ebx, eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp - 0xc]
push dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x428fe1
push 1
pop ebx
test ebx, ebx
je 0x429039
cmp byte [ebp - 0x110], 0
lea eax, [ebp - 0x110]
je 0x429008
cmp byte [eax], 0x5c
jne 0x428ffc
mov byte [eax], 0x2f
push eax
call dword [sym.imp.USER32.dll_CharNextA]
cmp byte [eax], 0
jne 0x428ff4
mov ecx, eax
lea edx, [ebp - 0x110]
sub ecx, edx
cmp ecx, 2
jne 0x429027
cmp byte [ebp - 0x10f], 0x3a
jne 0x429027
mov byte [eax], 0x2f
and byte [eax + 1], 0
lea eax, [ebp - 0x110]
push eax
push str.HOME
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0x110]
push edi
mov ebx, str.USER
push eax
push ebx
call esi
test eax, eax
jne 0x429092
lea eax, [ebp - 0x110]
push edi
push eax
push str.USERNAME
call esi
test eax, eax
jne 0x429084
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x429084
mov dword [0x495d80], 0x48338c
jmp 0x4290a5
lea eax, [ebp - 0x110]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov dword [0x495d80], eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42ae2d
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x42ae62
mov ecx, dword [ebp + 0x18]
cmp ecx, edi
je 0x42ae5e
mov eax, dword [ecx + 4]
mov esi, 0x3e8
cdq
idiv esi
mov ecx, dword [ecx]
imul ecx, ecx, 0x3e8
add eax, ecx
push eax
call sym.ruby187g.exc_rb_w32_sleep
pop ecx
jmp 0x42aeb4
push 0xffffffffffffffff
jmp 0x42ae56
call sym.ruby187g.exc_rb_w32_enter_critical
mov esi, 0x495540
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_select]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
jne 0x42aeaf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call sym.ruby187g.exc_rb_w32_map_errno
pop ecx
mov esi, eax
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], esi
or edi, edi
call sym.ruby187g.exc_rb_w32_leave_critical
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x42aef3
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
lea eax, [ebp - 0x190]
push edi
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x42af1a
push str.Unable_to_locate_winsock_library__n
call sym.ruby187g.exc_rb_fatal
cmp byte [ebp - 0x190], 2
je 0x42af2d
push str.could_not_find_version_2_of_winsock_dll_n
call sym.ruby187g.exc_rb_fatal
push 1
pop edi
mov dword [0x4954a0], edi
call sym.ruby187g.exc_GetCurrentThreadHandle
mov dword [0x495498], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0
push 0
push 0
push 0
mov dword [0x49549c], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x495558], eax
jne 0x42af6c
push str.Unable_to_create_interrupt_event__n
call sym.ruby187g.exc_rb_fatal
mov dword [0x495d90], edi
pop edi
leave
ret

Function at 0x42b0be
Capabilities:
Connect socket

Disassembly:
cmp dword [0x495d90], 0
jne 0x42b0cc
call fcn.0042aef3
push esi
call sym.ruby187g.exc_rb_w32_enter_critical
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
cmp esi, 0xffffffff
jne 0x42b121
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x42b115
push edi
push eax
call sym.ruby187g.exc_rb_w32_map_errno
pop ecx
mov edi, eax
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], edi
pop edi
jmp 0x42b121
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x2734
call sym.ruby187g.exc_rb_w32_leave_critical
mov eax, esi
pop esi
ret
Function at 0x42b6e9
Capabilities:
Get hostname

Disassembly:
cmp dword [0x495d90], 0
jne 0x42b6f7
call fcn.0042aef3
push esi
call sym.ruby187g.exc_rb_w32_enter_critical
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.WS2_32.dll_gethostname]
mov esi, eax
cmp esi, 0xffffffff
jne 0x42b72b
push edi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call sym.ruby187g.exc_rb_w32_map_errno
pop ecx
mov edi, eax
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], edi
pop edi
call sym.ruby187g.exc_rb_w32_leave_critical
mov eax, esi
pop esi
ret

Function at 0x42bbf6
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
mov dword [ebp - 4], edi
jg 0x42bc1d
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x42bd3f
call sym.ruby187g.exc_rb_w32_osid
push 1
pop ebx
cmp eax, ebx
jne 0x42bc2b
neg esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp esi, eax
mov eax, dword [ebp + 0xc]
jne 0x42bc62
cmp eax, edi
je 0x42bc62
cmp eax, 9
je 0x42bc62
push eax
call dword [sym.imp.MSVCRT.dll_raise]
mov esi, eax
pop ecx
cmp esi, edi
je 0x42bc5b
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
mov eax, esi
jmp 0x42bd3f
sub eax, edi
je 0x42bd0d
dec eax
dec eax
je 0x42bcdb
sub eax, 7
je 0x42bc88
call dword [sym.imp.MSVCRT.dll__errno]
or dword [ebp - 4], 0xffffffff
mov dword [eax], 0x16
jmp 0x42bd3c
call sym.ruby187g.exc_rb_w32_enter_critical
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, edi
je 0x42bcc2
cmp esi, 0xffffffff
je 0x42bcc2
push edi
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x42bcb9
call dword [sym.imp.MSVCRT.dll__errno]
or dword [ebp - 4], 0xffffffff
mov dword [eax], ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42bd37
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x42bd2b
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 3
jmp 0x42bd33
call sym.ruby187g.exc_rb_w32_enter_critical
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GenerateConsoleCtrlEvent]
test eax, eax
jne 0x42bd37
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x42bd2b
call esi
push eax
call sym.ruby187g.exc_rb_w32_map_errno
pop ecx
mov esi, eax
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], esi
jmp 0x42bd33
call sym.ruby187g.exc_rb_w32_enter_critical
push esi
push edi
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, edi
je 0x42bcc2
cmp eax, 0xffffffff
je 0x42bcc2
push eax
jmp 0x42bcba
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], ebx
or dword [ebp - 4], 0xffffffff
call sym.ruby187g.exc_rb_w32_leave_critical
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret