joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4051a2
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 0xc]
test byte [eax + 0x14], 8
je 0x4051d0
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x4051cc
mov ecx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
sub esi, ecx
mov al, byte [esi + ecx]
xor al, 1
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x4051be
pop esi
xor eax, eax
pop ebp
ret
push 0xfffffffffffffff6
pop eax
pop ebp
ret

Function at 0x4054b6
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x490
push esi
push edi
mov eax, 0x80
mov esi, edx
push eax
mov dword [esp + 0x10], eax
mov edi, ecx
lea eax, [esp + 0x14]
push 0
push eax
call fcn.0040a390
add esp, 0xc
lea eax, [esp + 0xc]
lea edx, [esp + 0x10]
mov ecx, edi
push eax
test esi, esi
je 0x405502
call fcn.004088f8
pop ecx
test eax, eax
je 0x405509
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00408873
jmp 0x4054f5
mov ax, word [esp + 0x10]
cmp ax, 0x17
jne 0x40552e
lea edx, [esp + 0xc]
mov dword [esp + 0xc], 0x1c
lea ecx, [esp + 0x10]
call fcn.00405445
mov ax, word [esp + 0x10]
movzx eax, ax
sub eax, 1
je 0x405574
sub eax, 1
je 0x405540
sub eax, 0x15
jne 0x4054fa
push 2
push 0
push 0
push 0x401
lea eax, [esp + 0xa0]
push eax
push dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x4054fa
lea ecx, [esp + 0x90]
call fcn.004050ed
jmp 0x4054fc
lea ecx, [esp + 0x12]
jmp 0x40556d

Function at 0x40557a
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa8
push esi
push edi
mov eax, 0x80
mov esi, edx
push eax
mov dword [esp + 0x10], eax
mov edi, ecx
lea eax, [esp + 0x34]
push 0
push eax
call fcn.0040a390
add esp, 0xc
lea eax, [esp + 0xc]
lea edx, [esp + 0x30]
mov ecx, edi
push eax
test esi, esi
je 0x4055e8
call fcn.00408873
pop ecx
cmp eax, 0xffffffff
je 0x4055e4
mov eax, dword [esp + 0xc]
push 0x1c
pop ecx
push 0x17
pop edx
cmp word [esp + 0x30], dx
cmove eax, ecx
cmp word [esp + 0x30], 2
mov dword [esp + 0xc], eax
je 0x4055f7
cmp word [esp + 0x30], dx
je 0x4055f7
xor eax, eax
jmp 0x40561f
call fcn.004088f8
pop ecx
cmp eax, 0xffffffff
jne 0x4055bf
or eax, eax
jmp 0x40561f
push 8
push 0x20
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x405625
lea eax, [esp + 0x10]
push eax
call fcn.0040deaa
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.getnameinfo_NI_NUMERICSERV_failed:
call fcn.00404f05
int3
Function at 0x406efd
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], 0x80
push edi
push dword [esi + 0x10]
mov edi, dword [esi + 0x88]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x88]
push eax
push dword [esi + 0x68]
call dword [sym.imp.WS2_32.dll_getsockname]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x406f56
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00406e8f
mov esi, eax
call fcn.0040dad4
mov dword [eax], esi
mov eax, ebx
jmp 0x406fa7
movzx eax, word [ebp - 0x88]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
mov dword [edi + 0x400], ecx
cmp ecx, ebx
je 0x406f3c
push esi
lea eax, [edi + 0x40c]
push eax
mov eax, 0x90
push eax
push eax
push 0
push edi
push ecx
push dword [esi + 0x68]
call dword [edi + 0x404]
cmp eax, 1
jne 0x406fac
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [esi + 0x38], 1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x3e5
je 0x406f9e
call edi
jmp 0x406f42
Function at 0x40740e
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov eax, edx
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
test eax, eax
je 0x40755f
mov edi, dword [ebp + 8]
test edi, edi
je 0x40755f
cmp dword [esi + 0x50], 0
je 0x407453
mov eax, dword [esi + 0x64]
shr eax, 2
not eax
test al, 1
jne 0x407453
call fcn.0040dad4
mov dword [eax], 0xb
jmp 0x40756a
mov ebx, dword [esi + 0x54]
test ebx, ebx
je 0x40746f
call fcn.0040dad4
mov ecx, ebx
mov edx, eax
call fcn.00406e8f
mov dword [edx], eax
jmp 0x40756a
mov eax, dword [esi + 0x40]
mov ecx, 0x11800
mov dword [ebp - 0xc], ecx
test eax, eax
jne 0x4074a7
push ecx
call fcn.0040dba8
mov dword [ebp - 8], eax
pop ecx
test eax, eax
jne 0x40749c
call fcn.0040dad4
mov dword [eax], 0xc
jmp 0x40756a
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], ecx
jmp 0x4074aa
mov dword [ebp - 8], eax
cmp ecx, edi
cmovb edi, ecx
mov ecx, eax
push edi
push dword [ebp - 4]
mov edx, edi
mov dword [ebp - 0xc], edi
call fcn.00406e13
pop ecx
pop ecx
test eax, eax
jne 0x40756a
push 0x4073dc
lea eax, [esi + 0x14]
xor ebx, ebx
push eax
push ebx
push ebx
xor edi, edi
lea eax, [ebp - 0xc]
inc edi
push edi
push eax
push dword [esi + 0x68]
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
jne 0x407513
mov eax, dword [ebp - 0xc]
push edi
push ebx
mov dword [esi + 0x50], edi
mov dword [esi + 0x48], eax
call dword [sym.imp.KERNEL32.dll_SleepEx]
cmp dword [esi + 0x50], ebx
jne 0x407506
cmp dword [esi + 0x48], ebx
je 0x407546
call fcn.0040dad4
mov dword [eax], 0x83
jmp 0x40756a
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x3e5
jne 0x40754b
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x48], eax
mov eax, dword [esi + 0x64]
shr eax, 2
not eax
mov dword [esi + 0x50], 1
test al, 1
je 0x407546
push str.check_socketio.cs_socketio_send_n
call fcn.00401006
pop ecx
mov eax, dword [ebp - 0xc]
jmp 0x40756d
call edi
mov ecx, eax
call fcn.00406e8f
mov esi, eax
call fcn.0040dad4
mov dword [eax], esi
jmp 0x40756a
call fcn.0040dad4
mov dword [eax], 0x16
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407628
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
push edi
cmp dword [esi + 0x38], 0
jne 0x40764c
call fcn.00406efd
test eax, eax
je 0x40764c
xor eax, eax
jmp 0x4077a0
mov eax, dword [esi + 0x64]
shr eax, 2
not eax
test al, 1
je 0x407696
push str.check_socketio.cs_socketio_accept_n
call fcn.00401006
pop ecx
push dword [esi + 0x10]
mov edi, dword [esi + 0x88]
and dword [esi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [esi + 0x3c]
test ebx, ebx
je 0x4076b1
call fcn.0040dad4
mov ecx, ebx
mov edx, eax
call fcn.00406e8f
mov dword [edx], eax
and dword [esi + 0x3c], 0
jmp 0x407777
xor edx, edx
mov ecx, esi
inc edx
call fcn.004079b8
test eax, eax
jne 0x407663
call fcn.0040dad4
mov dword [eax], 0xb
jmp 0x407645
push 4
lea eax, [esi + 0x68]
push eax
push 0x700b
push 0xffff
push dword [edi + 0x400]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x4076ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.00406e8f
mov esi, eax
call fcn.0040dad4
mov dword [eax], esi
jmp 0x407777
mov ebx, 0x8c
push ebx
call fcn.0040dba8
mov esi, eax
pop ecx
test esi, esi
jne 0x40770b
call fcn.0040dad4
mov dword [eax], 0xc
jmp 0x407777
push ebx
push 0
push esi
call fcn.0040a390
mov eax, dword [edi + 0x400]
add esp, 0xc
mov dword [esi + 0x68], eax
mov dword [esi + 0x84], 3
or dword [edi + 0x400], 0xffffffff
cmp dword [ebp - 4], 0
je 0x40779e
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x40779e
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, 0x90
push eax
push eax
push 0
push edi
call dword [edi + 0x408]
mov edx, dword [ebp - 8]
test edx, edx
je 0x40779e
mov ecx, dword [ebp - 4]
push edx
push dword [ebp - 0xc]
call fcn.00406e13
pop ecx
pop ecx
test eax, eax
je 0x407799
mov eax, dword [edi + 0x400]
cmp eax, 0xffffffff
je 0x407645
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [edi + 0x400], 0xffffffff
jmp 0x407645
mov eax, dword [ebp - 8]
mov dword [ebx], eax
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x407936
Capabilities:
Set socket configuration

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov esi, ebx
cmp dword [edi + 0x54], ebx
je 0x407949
mov esi, dword [edi + 0x54]
jmp 0x40796a
push ebx
push ebx
push 0x7010
push 0xffff
push dword [edi + 0x68]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x40796a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x24], ebx
mov dword [edi + 0x50], ebx
test esi, esi
je 0x407995
mov dword [edi + 0x3c], esi
mov dword [edi + 0x54], esi
call fcn.0040dad4
mov ecx, esi
mov edx, eax
call fcn.00406e8f
mov dword [edx], eax
jmp 0x4079a4
push 0x18
lea eax, [edi + 0x40]
push ebx
push eax
call fcn.0040a390
add esp, 0xc
neg esi
mov dword [edi + 0x84], 3
pop edi
sbb esi, esi
mov eax, esi
pop esi
pop ebx
ret
Function at 0x407b66
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor ebx, ebx
mov esi, edx
and dword [ebp - 0xc], ebx
and dword [eax], ebx
push edi
xor edi, edi
test ecx, ecx
je 0x407b90
call fcn.00407b0d
mov ebx, eax
test ebx, ebx
je 0x407cc8
test esi, esi
je 0x407ba5
mov ecx, esi
call fcn.00407b0d
mov edi, eax
test edi, edi
je 0x407cc8
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push edi
push ebx
call dword [sym.imp.WS2_32.dll_GetAddrInfoW]
mov esi, eax
test esi, esi
jne 0x407ccb
lea eax, [ebp - 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc], esi
je 0x407ccb
push 0x20
call fcn.0040dba8
pop ecx
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
test eax, eax
je 0x407cc8
mov ecx, dword [ebp - 4]
push 0x20
push dword [ecx]
push eax
call fcn.00409e10
mov edx, dword [ebp - 8]
xor ecx, ecx
add esp, 0xc
mov eax, dword [edx]
mov dword [eax + 0x1c], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x407c69
push ecx
push ecx
push ecx
push ecx
push 0xffffffffffffffff
push eax
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x407c5b
push eax
call fcn.0040dba8
mov dword [ebp - 0x18], eax
pop ecx
test eax, eax
je 0x407c5b
xor ecx, ecx
push ecx
push ecx
push dword [ebp - 0x10]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x14]
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x407c5b
mov ecx, dword [ebp - 0x18]
jmp 0x407c5d
xor ecx, ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov dword [eax + 0x14], ecx
test ecx, ecx
je 0x407cc8
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 0x10], 0
je 0x407c89
push dword [eax + 0x10]
call fcn.0040dba8
mov edx, dword [ebp - 8]
pop ecx
mov ecx, dword [edx]
mov dword [ecx + 0x18], eax
test eax, eax
je 0x407cc8
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 0x10], 0
je 0x407caf
push dword [eax + 0x10]
push dword [eax + 0x18]
mov eax, dword [edx]
push dword [eax + 0x18]
call fcn.00409e10
mov eax, dword [ebp - 4]
add esp, 0xc
mov edx, dword [ebp - 8]
mov eax, dword [eax]
mov edx, dword [edx]
add eax, 0x1c
add edx, 0x1c
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
cmp dword [eax], 0
jne 0x407bd3
jmp 0x407ccb
push 8
pop esi
test ebx, ebx
je 0x407cd6
push ebx
call fcn.0040dae7
pop ecx
test edi, edi
je 0x407ce1
push edi
call fcn.0040dae7
pop ecx
cmp dword [ebp - 0xc], 0
je 0x407cf0
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
test esi, esi
je 0x407d05
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx]
test ecx, ecx
je 0x407d05
call fcn.00407ad4
and dword [ebx], 0
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x401290
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x407018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
or esi, 0xffffffff
xor ecx, ecx
lea esp, [esp]
mov eax, ecx
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], ecx
test cl, 1
je 0x4012c5
xor eax, 0xedb88320
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x4012d9
shr eax, 1
xor eax, 0xedb88320
jmp 0x4012db
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x4012ef
shr eax, 1
xor eax, 0xedb88320
jmp 0x4012f1
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x401305
shr eax, 1
xor eax, 0xedb88320
jmp 0x401307
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x40131b
shr eax, 1
xor eax, 0xedb88320
jmp 0x40131d
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x401331
shr eax, 1
xor eax, 0xedb88320
jmp 0x401333
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x401347
shr eax, 1
xor eax, 0xedb88320
jmp 0x401349
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
test al, 1
je 0x40135d
shr eax, 1
xor eax, 0xedb88320
jmp 0x40135f
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
inc ecx
cmp ecx, 0x100
jb 0x4012b0
xor ecx, ecx
test edx, edx
je 0x40139a
lea esp, [esp]
movzx eax, byte [ecx + edi]
xor eax, esi
and eax, 0xff
shr esi, 8
xor esi, dword [ebp + eax*4 - 0x404]
inc ecx
cmp ecx, edx
jb 0x401380
mov ecx, dword [ebp - 4]
not esi
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004035b2
mov esp, ebp
pop ebp
ret

Function at 0x4013b0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x407018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x108], edx
mov dword [ebp - 0x10c], ecx
xor eax, eax
jmp 0x4013e0
mov byte [ebp + eax - 0x104], al
inc eax
cmp eax, 0x100
jb 0x4013e0
xor edi, edi
xor esi, esi
mov dl, byte [ebp + esi - 0x104]
mov eax, esi
and eax, 0xf
movzx ecx, dl
movzx eax, byte [eax + ebx]
add edi, eax
add edi, ecx
and edi, 0xff
inc esi
mov al, byte [ebp + edi - 0x104]
mov byte [ebp + esi - 0x105], al
mov byte [ebp + edi - 0x104], dl
cmp esi, 0x100
jb 0x4013f3
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp dword [ebp - 0x108], ebx
jbe 0x40149d
lea esp, [esp]
inc esi
and esi, 0xff
inc edi
mov dl, byte [ebp + esi - 0x104]
movzx eax, dl
add ebx, eax
and ebx, 0xff
movzx eax, byte [ebp + ebx - 0x104]
mov byte [ebp + esi - 0x104], al
mov byte [ebp + ebx - 0x104], dl
movzx ecx, byte [ebp + esi - 0x104]
movzx eax, dl
add ecx, eax
and ecx, 0xff
movzx eax, byte [ebp + ecx - 0x104]
mov ecx, dword [ebp - 0x10c]
xor byte [ecx + edi - 1], al
cmp edi, dword [ebp - 0x108]
jb 0x401440
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004035b2
mov esp, ebp
pop ebp
ret 4
Function at 0x4014b0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4014d9
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push ebx
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea ecx, [ebx + 0xc]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x401508
push esi
call dword [sym.imp.ntdll.dll_NtClose]
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [edi + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401535
push esi
call dword [sym.imp.ntdll.dll_NtClose]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push esi
mov dword [edi], ebx
mov dword [edi + 4], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, edi
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x401ab0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa5c
mov eax, dword [0x407018]
xor eax, esp
mov dword [esp + 0xa58], eax
push ebx
push esi
mov eax, ecx
push edi
push eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x664]
push str._s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x664]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b8e
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
lea eax, [esp + 0x10]
push eax
push esi
call edi
test eax, eax
je 0x401b87
mov ebx, dword [sym.imp.MSVCR110.dll_wcsstr]
cmp word [esp + 0x3c], 0x2e
je 0x401b7b
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x10]
lea eax, [esp + 0x268]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
test byte [esp + 0x10], 0x10
je 0x401b5c
lea ecx, [esp + 0x260]
call fcn.00401ab0
jmp 0x401b7b
lea eax, [esp + 0x3c]
push str..exe
push eax
call ebx
add esp, 8
test eax, eax
je 0x401b7b
lea ecx, [esp + 0x260]
call fcn.004019b0
lea eax, [esp + 0x10]
push eax
push esi
call edi
test eax, eax
jne 0x401b20
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0xa64]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004035b2
mov esp, ebp
pop ebp
ret
Function at 0x401fb0
Capabilities:
Access peb ldr_data
Check mutex on windows
Create thread
Get file size
Query environment variable
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x81c
mov eax, dword [0x407018]
xor eax, esp
mov dword [esp + 0x818], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov dword [esp + 0xc], eax
mov eax, dword fs:[0x30]
push 0xf0000000
mov eax, dword [eax + 0xc]
push 1
mov eax, dword [eax + 0x14]
push 0
mov eax, dword [eax + 0x20]
push 0
push 0x407650
mov dword [0x40764c], eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40201c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x818]
xor ecx, esp
call fcn.004035b2
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [0x40764c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402079
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x402079
push 0
lea eax, [esp + 0x20]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402079
push dword [esp + 0xc]
mov edx, edi
mov ecx, ebx
call fcn.00401550
push str.Global3pc6RWOgectGTFqCowxjeGy3XIGPtLwNrsr2zDctYD4hAU5pj4GW7rm8gHrHyTB6
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4020ae
mov ecx, dword [esp + 0x824]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004035b2
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x401cf0
push 0
push 0
call esi
push 0
push 0
push 0
push 0x401bd0
push 0
push 0
call esi
push 0x400
lea eax, [esp + 0x24]
push eax
push str.userprofile
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, dword [sym.imp.ntdll.dll_NtDelayExecution]
mov dword [esp + 0x10], 0x4d2fa200
mov dword [esp + 0x14], 0xffffffff
lea ecx, [esp + 0x20]
call fcn.00401ab0
lea eax, [esp + 0x10]
push eax
push 0
call esi
jmp 0x402101
Function at 0x402e50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x404148
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x407018]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x407018]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0x40], 0
je 0x402fd7
cmp byte [edi + 0x45], 0
je 0x402fd7
push 0xffffffffffffffff
call fcn.004022d0
cmp eax, 0xffffffff
jne 0x402eb0
xor al, al
jmp 0x402fd9
sub esp, 8
lea ecx, [esp + 0x20]
call fcn.00402c60
mov dword [esp + 0x40], 0
mov ebx, dword [esp + 0x2c]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x2c]
cmp ebx, 0x10
lea edx, [esp + 0x1c]
cmovae edx, dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
cmovae ecx, dword [esp + 0x1c]
add eax, edx
push eax
push ecx
mov ecx, dword [edi + 0x40]
lea eax, [edi + 0x48]
push eax
call dword [sym.imp.MSVCP110.dll_public:_int___thiscall_std::codecvt_char__char__int_::unshift_int___char___char___char___const]
sub eax, 0
je 0x402f0f
dec eax
je 0x402f13
sub eax, 2
je 0x402fbd
xor bl, bl
jmp 0x402fbf
mov byte [edi + 0x45], 0
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmp ebx, 0x10
lea eax, [esp + 0x18]
cmovae eax, ecx
sub esi, eax
je 0x402f4b
push dword [edi + 0x50]
lea eax, [esp + 0x1c]
push esi
cmp ebx, 0x10
cmovae eax, ecx
push 1
push eax
call dword [sym.imp.MSVCR110.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x402f08
cmp byte [edi + 0x45], 0
je 0x402fbd
test esi, esi
jne 0x402ec4
mov ecx, dword [esp + 0x28]
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x402fb2
lea esi, [ecx + 8]
push ecx
push esi
lea ecx, [esp + 0x20]
call fcn.00403170
test al, al
je 0x402ec4
cmp dword [esp + 0x2c], 0x10
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x18]
cmovae ecx, dword [esp + 0x18]
xorps xmm0, xmm0
movq qword [ecx + eax], xmm0
cmp dword [esp + 0x2c], 0x10
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
mov dword [esp + 0x28], esi
mov byte [eax + esi], 0
jmp 0x402ec4
push str.string_too_long
call dword [sym.imp.MSVCP110.dll_void___cdecl_std::_Xlength_error_char_const__]
mov bl, 1
cmp dword [esp + 0x2c], 0x10
jb 0x402fd3
push dword [esp + 0x18]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov al, bl
jmp 0x402fd9
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004035b2
mov esp, ebp
pop ebp
ret