joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49b8d0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov edx, dword [ebp + 0x14]
push ebx
push esi
push edi
test edx, edx
jne 0x49b8f2
mov ecx, dword [ebp + 8]
xor eax, eax
mov ax, word [ecx]
mov edx, dword [eax*4 + 0x4ffae0]
mov dword [ebp + 0x14], edx
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x49b902
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
je 0x49ba26
lea eax, [ebp - 0x14]
mov dword [ebp - 4], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 4]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
test eax, 0xfffe
jne 0x49b967
cmp al, 1
je 0x49b940
mov al, 6
mov dword [edi + 4], ebx
xor ebx, ebx
mov ecx, dword [esi + 8]
mov bh, byte [esi + 0xc]
mov dword [edi], eax
mov bl, byte [esi + 0xd]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ebx
jmp 0x49b967
mov al, byte [esi + 3]
mov bl, byte [esi + 5]
mov bh, byte [esi + 4]
mov ah, byte [esi + 2]
shl eax, 0x10
xor ecx, ecx
shl ebx, 0x10
mov al, 2
mov bl, byte [esi + 7]
mov dword [edi + 8], ecx
mov bh, byte [esi + 6]
mov dword [edi + 0xc], ecx
mov dword [edi + 4], ebx
mov dword [edi], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [edx + 8]
lea ecx, [ebp - 0x14]
push 0x10
push ecx
mov ecx, dword [ebp + 0xc]
push 0
push eax
push ecx
push edx
call sub.WSOCK32.dll_sendto
mov esi, eax
mov eax, dword [ebp + 0x10]
cmp esi, eax
jne 0x49b992
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
jne 0x49ba26
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x49ba26
cmp esi, esi
jne 0x49ba26
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
xor edx, edx
mov ecx, 0x4d6394
cmp dword [ecx], esi
je 0x49b9cb
add ecx, 0xc
inc edx
cmp ecx, 0x4d6508
jb 0x49b9b9
jmp 0x49b9fa
lea ecx, [edx + edx*2]
xor eax, eax
shl ecx, 2
mov al, byte [ecx + 0x4d6391]
mov dword [0x4ffaf4], eax
mov eax, dword [ecx + 0x4d6398]
mov dword [0x4ffaf0], eax
mov al, byte [ecx + 0x4d6390]
test al, al
je 0x49b9fa
mov ecx, dword [ebp + 0x14]
mov byte [ecx + 0xd], 1
cmp edx, 0x1f
jne 0x49ba26
push esi
push str.Unknown_Error__u
push 0x4fba50
call fcn.004b77e0
add esp, 0xc
mov dword [0x4ffaf4], 1
mov dword [0x4ffaf0], 0x4fba50
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x49ba30
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
lea eax, [ebp - 0x18]
push esi
push edi
mov dword [ebp - 4], 1
mov dword [ebp - 8], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 8]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
test eax, 0xfffe
jne 0x49ba9d
cmp al, 1
je 0x49ba76
mov al, 6
mov dword [edi + 4], ebx
xor ebx, ebx
mov ecx, dword [esi + 8]
mov bh, byte [esi + 0xc]
mov dword [edi], eax
mov bl, byte [esi + 0xd]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ebx
jmp 0x49ba9d
mov al, byte [esi + 3]
mov bl, byte [esi + 5]
mov bh, byte [esi + 4]
mov ah, byte [esi + 2]
shl eax, 0x10
xor ecx, ecx
shl ebx, 0x10
mov al, 2
mov bl, byte [esi + 7]
mov dword [edi + 8], ecx
mov bh, byte [esi + 6]
mov dword [edi + 0xc], ecx
mov dword [edi + 4], ebx
mov dword [edi], eax
push 0x48
call fcn.0048bc10
mov ecx, dword [str.SOCK]
mov edi, dword [ebp + 8]
mov esi, eax
xor eax, eax
add esp, 4
mov dword [esi], ecx
mov ax, word [edi]
xor ecx, ecx
mov edx, dword [eax*4 + 0x4c5920]
mov cx, word [eax*2 + 0x4c5910]
push edx
push 2
push ecx
call sub.WSOCK32.dll_socket
lea edx, [ebp - 4]
push 4
push edx
push 0x20
push 0xffff
push eax
mov dword [esi + 8], eax
call sub.WSOCK32.dll_setsockopt
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x49bb79
lea ecx, [ebp - 0x18]
push 0x10
push ecx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x49bb79
mov edx, dword [0x4fba94]
mov eax, dword [esi + 8]
push 1
push 0x402
push edx
push eax
call sub.WSOCK32.dll_WSAAsyncSelect
test eax, eax
jne 0x49bb79
mov byte [esi + 0xc], 2
mov dword [esi + 0x3c], 0x226
mov edx, dword [edi]
lea ecx, [esi + 0x20]
mov dword [esi + 0x20], edx
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
mov edx, dword [edi + 8]
mov dword [ecx + 8], edx
mov ax, word [edi + 0xc]
mov edx, dword [esi + 8]
mov word [ecx + 0xc], ax
mov eax, dword [0x4d634c]
test eax, eax
mov ecx, 0x4d6348
je 0x49bb67
cmp dword [eax + 8], edx
jae 0x49bb67
mov ecx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x49bb59
mov edx, dword [ecx + 4]
mov eax, esi
mov dword [esi + 4], edx
mov dword [ecx + 4], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
xor edx, edx
mov ecx, 0x4d6394
cmp dword [ecx], edi
je 0x49bb99
add ecx, 0xc
inc edx
cmp ecx, 0x4d6508
jb 0x49bb87
jmp 0x49bbc9
lea ecx, [edx + edx*2]
xor eax, eax
shl ecx, 2
mov al, byte [ecx + 0x4d6391]
mov dword [0x4ffaf4], eax
mov eax, dword [ecx + 0x4d6398]
mov dword [0x4ffaf0], eax
mov al, byte [ecx + 0x4d6390]
test al, al
je 0x49bbc9
test esi, esi
je 0x49bbc9
mov byte [esi + 0xd], 1
cmp edx, 0x1f
jne 0x49bbf5
push edi
push str.Unknown_Error__u
push 0x4fba50
call fcn.004b77e0
add esp, 0xc
mov dword [0x4ffaf4], 1
mov dword [0x4ffaf0], 0x4fba50
mov eax, dword [esi + 8]
test eax, eax
je 0x49bc02
push eax
call sub.WSOCK32.dll_closesocket
push esi
call fcn.0048bd90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x49bd00
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x400
push ebx
push ebp
push esi
mov esi, dword [esp + 0x410]
push edi
xor edi, edi
cmp esi, edi
jne 0x49bd6c
mov dword [0x4ffaf4], 0x18
xor ecx, ecx
mov eax, 0x4d6508
cmp byte [eax], 0x18
je 0x49bd3a
add eax, 8
inc ecx
cmp eax, 0x4d6520
jb 0x49bd28
jmp 0x49bd46
mov eax, dword [ecx*8 + 0x4d650c]
mov dword [0x4ffaf0], eax
mov ecx, dword [0x4ffaf0]
push ecx
push str.netGetHostAddr
push str.NET:__s_failed:__s
call fcn.0048fa80
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x400
ret
push esi
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [0x4d6524], eax
je 0x49bd82
push eax
jmp 0x49be90
mov eax, dword [0x4fba94]
lea edx, [esp + 0x10]
push 0x400
push edx
mov ebx, 0x404
push esi
push ebx
push eax
mov word [0x4ffae8], di
mov word [0x4fba48], di
call sub.WSOCK32.dll_WSAAsyncGetHostByName
mov ecx, dword [0x4d6344]
mov ebp, eax
mov edi, dword [ecx]
call fcn.0048ea90
mov esi, eax
add esi, edi
xor edi, edi
cmp word [0x4ffae8], bx
je 0x49bde3
call fcn.0048ea90
mov edi, eax
cmp edi, esi
jae 0x49bdf5
call fcn.0048f1d0
cmp word [0x4ffae8], bx
jne 0x49bdca
cmp edi, esi
jae 0x49bdf5
mov ax, word [0x4fba48]
neg ax
sbb eax, eax
inc eax
jmp 0x49be0b
test ebp, ebp
je 0x49bdff
push ebp
call sub.WSOCK32.dll_WSACancelAsyncRequest
push 0x274c
call sub.WSOCK32.dll_WSASetLastError
xor al, al
test al, al
jne 0x49be87
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
xor edx, edx
mov ecx, 0x4d6394
cmp dword [ecx], esi
je 0x49be2f
add ecx, 0xc
inc edx
cmp ecx, 0x4d6508
jb 0x49be1d
jmp 0x49be4e
lea ecx, [edx + edx*2]
shl ecx, 2
xor eax, eax
mov al, byte [ecx + 0x4d6391]
mov ecx, dword [ecx + 0x4d6398]
mov dword [0x4ffaf4], eax
mov dword [0x4ffaf0], ecx
cmp edx, 0x1f
jne 0x49be7a
push esi
push str.Unknown_Error__u
push 0x4fba50
call fcn.004b77e0
add esp, 0xc
mov dword [0x4ffaf4], 1
mov dword [0x4ffaf0], 0x4fba50
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x400
ret
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call sub.WSOCK32.dll_ntohl
pop edi
pop esi
mov dword [0x4d6524], eax
pop ebp
mov eax, 0x4d6520
pop ebx
add esp, 0x400
ret
Function at 0x49df20
Capabilities:
Create thread

Disassembly:
mov eax, dword [0x4d3e04]
test eax, eax
je 0x49df67
push esi
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
push 0x500140
push 0
push esi
push 0x49e020
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push esi
mov dword [0x50014c], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
ret
Function at 0x4b8ee0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c7e30
push 0x4beef8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x5139dc], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x5139d8], ecx
shl ecx, 8
add ecx, edx
mov dword [0x5139d4], ecx
shr eax, 0x10
mov dword [0x5139d0], eax
call fcn.004bd770
test eax, eax
jne 0x4b8f4a
push 0x1c
call fcn.004b90b0
add esp, 4
mov dword [ebp - 4], 0
call fcn.004bec00
call fcn.004bd490
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x609c74], eax
call fcn.004beaa0
mov dword [0x5139b8], eax
test eax, eax
je 0x4b8f7d
mov eax, dword [0x609c74]
test eax, eax
jne 0x4b8f87
push 0xffffffffffffffff
call fcn.004b9450
add esp, 4
call fcn.004be7f0
call fcn.004be700
call fcn.004b9420
mov esi, dword [0x609c74]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4b9066
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4b8fce
test al, al
je 0x4b8fce
and eax, 0xff
push eax
call fcn.004be6a0
add esp, 4
test eax, eax
je 0x4b8fa8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4b8fa8
cmp byte [esi], 0x22
jne 0x4b8fd7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4b8fe7
cmp al, 0x20
ja 0x4b8fe7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4b8fd7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x4b9008
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x4b900d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.004b9450
jmp 0x4b904b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x4b8fd7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4b9066

Function at 0x4b90b0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x5139c0], 1
jne 0x4b90be
call fcn.004befd0
mov eax, dword [esp + 4]
push eax
call fcn.004bf010
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4b9490
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x513a0c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4b94af
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x513a08], 1
mov byte [0x513a04], bl
jne 0x4b9509
mov ecx, dword [0x609c70]
test ecx, ecx
je 0x4b94f7
mov esi, dword [0x609c6c]
sub esi, 4
cmp esi, ecx
jb 0x4b94f7
mov eax, dword [esi]
test eax, eax
je 0x4b94f0
call eax
mov ecx, dword [0x609c70]
sub esi, 4
cmp esi, ecx
jae 0x4b94e2
push 0x4ca01c
push 0x4ca014
call fcn.004b9540
add esp, 8
push 0x4ca024
push 0x4ca020
call fcn.004b9540
add esp, 8
test ebx, ebx
jne 0x4b9530
push ebp
mov dword [0x513a0c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x4beaa0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x513d88]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x4beae2
call edi
mov esi, eax
test esi, esi
je 0x4beacc
mov eax, 1
jmp 0x4beadd
call ebp
mov ebx, eax
test ebx, ebx
je 0x4bebef
mov eax, 2
mov dword [0x513d88], eax
cmp eax, 1
jne 0x4beb82
test esi, esi
jne 0x4beafb
call edi
mov esi, eax
test esi, esi
je 0x4bebef
cmp word [esi], 0
mov eax, esi
je 0x4beb15
add eax, 2
cmp word [eax], 0
jne 0x4beb03
add eax, 2
cmp word [eax], 0
jne 0x4beb03
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4beb74
push edi
call fcn.004b8c90
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4beb74
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4beb66
push ebx
call fcn.004b8c40
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x4bebef
test ebx, ebx
jne 0x4beb93
call ebp
mov ebx, eax
test ebx, ebx
je 0x4bebef
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4bebab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4beb9b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4beb9b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004b8c90
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4bebcd
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x4bf010
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4e48c0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4bf034
add eax, 8
inc ebp
cmp eax, 0x4e4950
jb 0x4bf025
cmp ecx, dword [ebp*8 + 0x4e48c0]
jne 0x4bf1db
mov eax, dword [0x5139c0]
cmp eax, 1
je 0x4bf19d
test eax, eax
jne 0x4bf060
cmp dword [0x4e2374], 1
je 0x4bf19d
cmp ecx, 0xfc
je 0x4bf1db
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4bf09b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4bf0e4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4c829c
add ebx, ecx
push ebx
call fcn.004b84e0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4c827c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x4e48c4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004c1ac0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x609b60]
test eax, eax
je 0x4bf1ae
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4bf1b8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4e48c4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x4bf510
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x609c60]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x4bf6bd
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x609b60]
lea edi, [ecx*4 + 0x609b60]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x4bf6bd
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x4bf57e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x4bf58f
push 2
push ebp
push eax
call fcn.004bf1f0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x4bf6ee
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x4bf639
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x4bf5ea
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x4bf5d7
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x4bf5ba
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4bf6df
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x4bf635
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x4bf5b6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4bf6ae
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4bf682
cmp eax, 5
jne 0x4bf66b
mov dword [0x5139c8], eax
mov dword [0x5139c4], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.004c13b0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x4bf6a2
cmp byte [ebp], 0x1a
jne 0x4bf6a2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x5139c4], 0x1c
jmp 0x4bf6c7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x5139c4], 9
pop edi
pop esi
pop ebp
mov dword [0x5139c8], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x4bf635
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4bf71f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x4bf639
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x4bf639
Function at 0x4c3b90
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004b8770
mov eax, dword [0x609c60]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x4c3cf2
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x609b60]
test byte [edx + ecx*8 + 4], 1
je 0x4c3cf2
push 1
push ebp
push ebx
call fcn.004bf1f0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x4c3cfc
push 2
push ebp
push ebx
call fcn.004bf1f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4c3cfc
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4c3c98
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.004c4120
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x4c3c3f
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.004bf510
add esp, 0xc
cmp eax, 0xffffffff
je 0x4c3c5b
sub esi, eax
test esi, esi
jle 0x4c3c71
jmp 0x4c3c30
cmp dword [0x5139c8], 5
jne 0x4c3c6e
mov dword [0x5139c4], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.004c4120
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.004bf1f0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x4c3cd9
push 0
push ecx
push ebx
call fcn.004bf1f0
add esp, 0xc
push ebx
call fcn.004c1630
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x4c3cd9
mov dword [0x5139c4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5139c8], eax
push 0
push edi
push ebx
call fcn.004bf1f0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x5139c4], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x4c44a0
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4c465e
push 0x3d
push edi
call fcn.004c47a0
mov esi, eax
add esp, 8
test esi, esi
je 0x4c465e
cmp edi, esi
je 0x4c465e
mov dl, byte [esi + 1]
mov ecx, dword [0x5139f0]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x5139ec]
cmp eax, ecx
jne 0x4c44f7
push eax
call fcn.004c4730
add esp, 4
mov dword [0x5139ec], eax
test eax, eax
jne 0x4c4572
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4c451e
mov eax, dword [0x5139f4]
test eax, eax
je 0x4c451e
call fcn.004c40a0
test eax, eax
je 0x4c456d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4c452a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.004b8c90
add esp, 4
mov dword [0x5139ec], eax
test eax, eax
je 0x4c465e
mov dword [eax], 0
mov eax, dword [0x5139f4]
test eax, eax
jne 0x4c456d
push 4
call fcn.004b8c90
add esp, 4
mov dword [0x5139f4], eax
test eax, eax
je 0x4c465e
mov dword [eax], 0
mov eax, dword [0x5139ec]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.004c46b0
mov esi, eax
add esp, 8
test esi, esi
jl 0x4c466f
cmp dword [ebx], 0
je 0x4c466f
test ebp, ebp
je 0x4c4667
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.004b8c40
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x4c45c9
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x4c45b8
lea eax, [esi*4]
push eax
push ebx
call fcn.004b97a0
add esp, 8
test eax, eax
je 0x4c45e3
mov dword [0x5139ec], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4c4656
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.004b8c90
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4c4656
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.004b8c40
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x4c45e7
test ebp, ebp
jne 0x4c4656
test esi, esi
jge 0x4c4679
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.004b97a0
add esp, 8
test eax, eax
je 0x4c465e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x5139ec], eax
jmp 0x4c45e7