joyce8/EMBER2024-capa huggingface dataset:
Function at 0x106fa6a
Capabilities:
Encode data using base64

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
cmp esi, eax
mov dword [ebp - 4], eax
je 0x106fba5
cmp dword [ebp + 0xc], eax
je 0x106fba5
cmp dword [ebp + 0x10], eax
je 0x106fba5
push esi
call fcn.0101e1a5
pop ecx
mov ebx, eax
push 4
cdq
pop ecx
idiv ecx
test edx, edx
je 0x106fab1
mov eax, 0x80004005
jmp 0x106fbaa
mov eax, ebx
sar eax, 2
cmp word [esi + ebx*2 - 2], 0x3d
push edi
lea edi, [eax + eax*2]
jne 0x106fac3
dec edi
cmp word [esi + ebx*2 - 4], 0x3d
jne 0x106facc
dec edi
push edi
call dword [0x1001388]
mov ecx, eax
test ecx, ecx
jne 0x106fae5
mov dword [ebp - 4], 0x8007000e
jmp 0x106fb83
test ebx, ebx
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
jle 0x106fb9f
or edi, 0xffffffff
xor eax, eax
mov ax, word [esi]
push eax
call fcn.0106fa04
and eax, 0x3f
shl eax, 2
cmp eax, edi
je 0x106fb7c
mov byte [ecx], al
xor eax, eax
mov ax, word [esi + 2]
push eax
call fcn.0106fa04
cmp eax, edi
je 0x106fb7c
mov dl, al
shr dl, 4
add byte [ecx], dl
cmp word [esi + 4], 0x3d
je 0x106fb4d
shl al, 4
mov byte [ecx + 1], al
xor eax, eax
mov ax, word [esi + 4]
push eax
call fcn.0106fa04
cmp eax, edi
je 0x106fb7c
mov dl, al
shr dl, 2
add byte [ecx + 1], dl
cmp word [esi + 6], 0x3d
je 0x106fb6d
shl al, 6
mov byte [ecx + 2], al
xor eax, eax
mov ax, word [esi + 6]
push eax
call fcn.0106fa04
cmp eax, edi
je 0x106fb7c
add byte [ecx + 2], al
sub ebx, 4
add esi, 8
add ecx, 3
test ebx, ebx
jg 0x106fafa
jmp 0x106fb9f
mov dword [ebp - 4], 0x80004005
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x106fb93
push eax
call dword [0x100138c]
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0x10]
and dword [eax], 0
mov eax, dword [ebp - 4]
pop edi
jmp 0x106fbaa
mov eax, 0x80070057
pop esi
pop ebx
leave
ret 0xc
Function at 0x106fbb5
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
lea eax, [ebp - 0xc]
push eax
xor ebx, ebx
push 0x20019
push ebx
mov esi, ecx
push 0x1016480
push 0x80000002
mov byte [esi], bl
mov byte [esi + 1], bl
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x106fcbf
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x10164d0
push dword [ebp - 0xc]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], 4
call edi
test eax, eax
jne 0x106fc51
cmp dword [ebp - 8], 4
jne 0x106fc51
cmp dword [ebp - 4], 1
jne 0x106fc51
mov byte [esi], 1
call fcn.01070296
test byte [0x108e4d5], 1
je 0x106fc51
push 0x1016470
push 0xa
push dword [0x108e4cc]
push dword [0x108e4c8]
call fcn.0102993f
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x10164f4
push dword [ebp - 0xc]
mov dword [ebp - 0x10], 4
mov dword [ebp - 4], ebx
call edi
test eax, eax
pop edi
jne 0x106fcb6
cmp dword [ebp - 8], 4
jne 0x106fcb6
cmp dword [ebp - 4], ebx
je 0x106fcb6
push dword [ebp - 4]
mov byte [esi + 1], 1
call fcn.0106ff91
cmp al, bl
mov byte [esi + 1], al
je 0x106fcb6
test byte [0x108e4d5], 1
je 0x106fcb6
push 0x1016470
push 0xb
push dword [0x108e4cc]
push dword [0x108e4c8]
call fcn.0102993f
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x106fdca
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
call fcn.0106fceb
mov ecx, eax
xor esi, esi
cmp ecx, esi
je 0x106fe07
mov eax, dword [0x1090f70]
cmp eax, esi
jne 0x106feed
push str.CreateFilterTestHook
push ecx
call dword [fcn.0100126c]
cmp eax, esi
mov dword [0x1090f70], eax
jne 0x106feed
lea eax, [ebp - 0xc]
push eax
push 0x20019
push esi
push str.SYSTEMCurrentControlSetControlPrint
push 0x80000002
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov edi, 0x1090d68
jne 0x106feba
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push esi
push str.PipelineFilterHook
push dword [ebp - 0xc]
mov dword [ebp - 4], esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 8], 4
call esi
test eax, eax
jne 0x106fe6b
cmp dword [ebp - 4], 4
jne 0x106fe6b
cmp dword [ebp - 8], 4
je 0x106fe6f
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 1
jne 0x106feaf
and dword [ebp - 4], 0
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 4]
push eax
push 0
push str.FilterHookModuleName
push dword [ebp - 0xc]
mov dword [ebp - 8], 0x208
call esi
test eax, eax
jne 0x106fe9f
cmp dword [ebp - 4], 1
je 0x106feaf
push str.FilterHook.dll
push 0x104
push edi
call fcn.0101c8b5
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
cmp dword [ebp - 0x10], 1
jne 0x106fef8
cmp dword [0x1090f70], esi
jne 0x106fee4
push edi
call dword [fcn.01001244]
cmp eax, esi
je 0x106fee4
push str.CreateFilterTestHook
push eax
call dword [fcn.0100126c]
mov dword [0x1090f70], eax
mov eax, dword [0x1090f70]
cmp eax, esi
je 0x106fef8
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop edi
pop esi
leave
ret 0xc

Function at 0x107006c
Capabilities:
Enumerate process modules

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
mov ebx, dword [0x1001118]
push esi
push edi
xor eax, eax
mov ecx, 0x200
lea edi, [ebp - 0x810]
rep stosd dword es:[edi], eax
lea eax, [ebp - 4]
push eax
mov edi, 0x800
push edi
lea eax, [ebp - 0x810]
xor esi, esi
push eax
mov dword [ebp - 4], esi
call ebx
push eax
call fcn.01070322
test eax, eax
je 0x107011b
cmp dword [ebp - 4], edi
ja 0x107011b
xor edi, edi
test dword [ebp - 4], 0xfffffffc
jbe 0x107011b
mov eax, dword [ebp + edi*4 - 0x810]
test eax, eax
je 0x10700f1
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push eax
call ebx
push eax
call fcn.01070316
test eax, eax
je 0x10700f1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 8]
ja 0x10700f1
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp ecx, dword [ebp + 8]
ja 0x10700fe
mov eax, dword [ebp - 4]
inc edi
shr eax, 2
cmp edi, eax
jb 0x10700c1
jmp 0x107011b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + edi*4 - 0x810]
call ebx
push eax
call fcn.0107030a
mov esi, eax
neg esi
sbb esi, esi
neg esi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc
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 0x47f030
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 0x47f028
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 [0x489f68], 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 [0x48a0c4]
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 [0x489f68]
push dword [ebp + 0x10]
mov esi, eax
shl esi, 3
call fcn.00402b0b
inc dword [0x489f68]
cmp byte [ebp + 0x14], 0
mov dword [esi + 0x489f70], eax
pop ecx
mov dword [esi + 0x489f74], 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 [0x48a0c4]
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 [0x48a1a0]
mov dword [ebp - 0x20], eax
mov eax, dword [0x48a174]
mov dword [ebp - 0xc], eax
mov eax, dword [sym.ruby187g.exc_ruby_scope]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x64]
mov dword [0x48a174], 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 [0x48a174], eax
pop esi
leave
ret
push eax
mov dword [0x4961e0], esi
mov dword [0x4961e4], 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 [0x48a140], 0
jne 0x404497
mov dword [0x48a140], eax
push dword [0x48a140]
call sym.ruby187g.exc_ruby_stop

Function at 0x408931
Capabilities:
Terminate process

Disassembly:
cmp dword [0x48a174], 0
je 0x408952
push 4
push 0x480078
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 0x4196c9
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.00419585
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 0x419726
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 0x419755
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 0x41d0d1
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 0x41d0fe
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 0x41d11c
push dword [ebp + 0xc]
call sym.ruby187g.exc_rb_big_clone
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
call fcn.0041ad56
pop ecx
pop ecx
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x41d13a
push dword [ebp - 4]
call sym.ruby187g.exc_rb_big_clone
mov dword [ebp - 4], eax
push dword [ebp - 4]
call fcn.0041ad56
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 0x41d16b
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 0x41d189
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.0041acf7
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 0x41d205
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 0x41d1f2
cmp ecx, esi
jge 0x41d226
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 0x41d21d
not ecx
mov dword [edx + eax], ecx
add eax, 4
dec esi
jne 0x41d213
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
cmp byte [eax + 8], 0
jne 0x41d239
push eax
call fcn.0041ad56
pop ecx
push dword [ebp - 0xc]
call fcn.0041add3
pop ecx
leave
ret
Function at 0x428bcb
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
mov dword [0x496264], edi
mov dword [0x496260], 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.00427c81
xor esi, esi
add esp, 0xc
cmp dword [0x496284], esi
je 0x428c21
cmp dword [sym.ruby187g.exc_ruby_nerrs], esi
jne 0x428c21
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 [0x496280], esi
je 0x428c2e
call sym.ruby187g.exc_rb_parser_append_print
cmp dword [0x49627c], esi
je 0x428c49
push dword [0x49628c]
push dword [0x496288]
call sym.ruby187g.exc_rb_parser_while_loop
pop ecx
pop ecx
pop edi
pop esi
ret

Function at 0x428efd
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.00428f79
call fcn.0042a6b1
push 0x496540
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x428f40
call fcn.00467f38
pop ecx
jmp fcn.0042af0b
Function at 0x428f79
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 0x4290a2
lea eax, [ebp - 0x110]
push edi
push eax
push str.HOMEDRIVE
call esi
test eax, eax
je 0x428fc9
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
jmp 0x428fcb
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 0x429047
cmp dword [ebp - 4], eax
jne 0x429047
lea eax, [ebp - 0x110]
push edi
push eax
push str.USERPROFILE
call esi
test eax, eax
jne 0x42904e
lea eax, [ebp - 8]
push eax
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4290a2
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 0x42904a
push 1
pop ebx
test ebx, ebx
je 0x4290a2
cmp byte [ebp - 0x110], 0
lea eax, [ebp - 0x110]
je 0x429071
cmp byte [eax], 0x5c
jne 0x429065
mov byte [eax], 0x2f
push eax
call dword [sym.imp.USER32.dll_CharNextA]
cmp byte [eax], 0
jne 0x42905d
mov ecx, eax
lea edx, [ebp - 0x110]
sub ecx, edx
cmp ecx, 2
jne 0x429090
cmp byte [ebp - 0x10f], 0x3a
jne 0x429090
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 0x4290fb
lea eax, [ebp - 0x110]
push edi
push eax
push str.USERNAME
call esi
test eax, eax
jne 0x4290ed
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 0x4290ed
mov dword [0x496d80], str._Unknown_
jmp 0x42910e
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 [0x496d80], eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42ae45
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x42ae7a
mov ecx, dword [ebp + 0x18]
cmp ecx, edi
je 0x42ae76
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 0x42aecc
push 0xffffffffffffffff
jmp 0x42ae6e
call sym.ruby187g.exc_rb_w32_enter_critical
mov esi, 0x496540
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 0x42aec7
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 0x42af0b
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 0x42af32
push str.Unable_to_locate_winsock_library__n
call sym.ruby187g.exc_rb_fatal
cmp byte [ebp - 0x190], 2
je 0x42af45
push str.could_not_find_version_2_of_winsock_dll_n
call sym.ruby187g.exc_rb_fatal
push 1
pop edi
mov dword [0x4964a0], edi
call sym.ruby187g.exc_GetCurrentThreadHandle
mov dword [0x496498], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0
push 0
push 0
push 0
mov dword [0x49649c], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x496558], eax
jne 0x42af84
push str.Unable_to_create_interrupt_event__n
call sym.ruby187g.exc_rb_fatal
mov dword [0x496d90], edi
pop edi
leave
ret

Function at 0x42b0d6
Capabilities:
Connect socket

Disassembly:
cmp dword [0x496d90], 0
jne 0x42b0e4
call fcn.0042af0b
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 0x42b139
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x42b12d
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 0x42b139
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