joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49e704
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0048f0c4
xor ebx, ebx
cmp dword [0x50a300], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x49e7da
push str.USER32.DLL
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x49e8ba
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x49e8ba
push eax
call fcn.0048f056
mov dword [esp], 0x4de128
push edi
mov dword [0x50a300], eax
call esi
push eax
call fcn.0048f056
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x50a304], eax
call esi
push eax
call fcn.0048f056
mov dword [0x50a308], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00491add
test eax, eax
pop ecx
pop ecx
je 0x49e7a8
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00484a74
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x49e7da
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0048f056
cmp eax, ebx
pop ecx
mov dword [0x50a310], eax
je 0x49e7da
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0048f056
pop ecx
mov dword [0x50a30c], eax
mov eax, dword [0x50a30c]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x49e85f
cmp dword [0x50a310], ecx
je 0x49e85f
push eax
call fcn.0048f0cd
push dword [0x50a310]
mov esi, eax
call fcn.0048f0cd
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x49e85f
cmp edi, ebx
je 0x49e85f
call esi
cmp eax, ebx
je 0x49e82c
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x49e82c
test byte [ebp - 0x18], 1
jne 0x49e85f
lea eax, [ebp - 0x10]
push eax
call fcn.00491b14
test eax, eax
pop ecx
je 0x49e847
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00484a74
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x49e856
or dword [ebp + 0x10], 0x200000
jmp 0x49e89a
or dword [ebp + 0x10], 0x40000
jmp 0x49e89a
mov eax, dword [0x50a304]
cmp eax, dword [ebp - 8]
je 0x49e89a
push eax
call fcn.0048f0cd
cmp eax, ebx
pop ecx
je 0x49e89a
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x49e89a
mov eax, dword [0x50a308]
cmp eax, dword [ebp - 8]
je 0x49e89a
push eax
call fcn.0048f0cd
cmp eax, ebx
pop ecx
je 0x49e89a
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x50a300]
call fcn.0048f0cd
cmp eax, ebx
pop ecx
je 0x49e8ba
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x49e8bc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4aac6e
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x503454]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4aacaf
cmp byte [ebp - 0x194], 2
jne 0x4aaca9
cmp byte [ebp - 0x193], 2
je 0x4aacb2
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048bcc6
leave
ret
Function at 0x4b3115
Capabilities:
Receive data
Receive data on socket

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4b3144
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x4b3254
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x1a8]
test ecx, ecx
je 0x4b3274
push dword [esi + 0x134]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4b32ad
cmp eax, 2
jg 0x4b32ad
push dword [esi + 0x130]
imul eax, eax, 3
push 1
add eax, 0x4dee28
push 2
push eax
call fcn.0048ac89
push dword [esi + 0x130]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.0048ac89
add esp, 0x20
xor eax, eax
ret

Function at 0x4b345c
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x154]
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
and dword [edi], 0
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4b34ce
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4b34a8
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4b34cd
push ebx
push esi
call fcn.004b7e43
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004b33ce
mov eax, dword [esi]
mov dword [eax + 0x860c], ebx
add esp, 0x14
mov dword [edi], 0x37
pop ebx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret

Function at 0x4b4d6b
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push edi
xor eax, eax
xor edi, edi
cmp dword [esi + 0x46c], edi
push 4
setne al
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4b4dab
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004b3364
add esp, 0xc
jmp 0x4b4e16
push dword [esi + 0x470]
mov dword [ebp - 0x14], 1
call fcn.004bba4b
imul eax, eax, 0x3e8
push dword [esi + 0x474]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], eax
call fcn.004bba4b
imul eax, eax, 0x3e8
pop ecx
pop ecx
push edi
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push edi
push edi
push 0xc
lea eax, [ebp - 0x14]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4b4e16
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.004b3364
add esp, 0x10
pop edi
leave
ret
Function at 0x4b52fb
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x503454]
xor eax, ebp
mov dword [ebp + 0x8c], eax
push ebx
push esi
mov esi, dword [ebp + 0x98]
cmp dword [esi + 0x8c], 2
mov ebx, dword [esi]
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], ebx
je 0x4b5448
cmp dword [esi + 0x1d8], 0
push edi
jne 0x4b5440
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x9c]
mov edi, 0x80
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4b5379
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004b7e43
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
jmp 0x4b53b9
push edi
lea eax, [ebp + 0xc]
push 0
push eax
mov dword [ebp - 0x7c], edi
call fcn.004857c0
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x9c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b53bc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004b7e43
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
jmp 0x4b5433
lea ebx, [esi + 0xb8]
lea edi, [esi + 0xe8]
lea esi, [ebp - 0x74]
call fcn.004b52c2
test eax, eax
jne 0x4b53ee
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004b7e43
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x4b5430
mov esi, dword [ebp - 0x78]
push 0x2e
lea eax, [esi + 0x58]
push ebx
push eax
call fcn.00484d60
lea edi, [esi + 0x11c]
lea ebx, [esi + 0xec]
add esp, 0xc
lea esi, [ebp + 0xc]
call fcn.004b52c2
test eax, eax
jne 0x4b543d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004b7e43
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
call fcn.004b33ce
add esp, 0x18
jmp 0x4b5447
mov esi, dword [ebp - 0x78]
push esi
call fcn.004b5270
pop ecx
pop edi
mov ecx, dword [ebp + 0x8c]
pop esi
xor ecx, ebp
pop ebx
call fcn.0048bcc6
add ebp, 0x90
leave
ret

Function at 0x4b545f
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x364]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4b54a4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004b7e43
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b3364
add esp, 0x14
jmp 0x4b54b1
push str.TCP_NODELAY_set_n
push esi
call fcn.004b3364
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4b54b4
Capabilities:
Check os version
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0xa4]
sub esp, 0x124
mov eax, dword [0x503454]
xor eax, ebp
mov dword [ebp + 0xa0], eax
push esi
push edi
xor eax, eax
cmp dword [0x50a38c], eax
push 2
mov dword [ebp - 0x78], 0x4020
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x80], 4
pop edi
jne 0x4b5529
mov esi, 0x114
push esi
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.004857c0
add esp, 0xc
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 0x74], esi
mov dword [0x50a38c], 1
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
je 0x4b5529
cmp dword [ebp - 0x70], 6
jb 0x4b5529
mov dword [0x50a38c], edi
cmp dword [0x50a38c], edi
je 0x4b5571
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x7c]
push eax
mov edi, 0x1001
push edi
mov esi, 0xffff
push esi
push dword [ebp + 0xac]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4b555d
mov eax, dword [ebp - 0x7c]
cmp eax, dword [ebp - 0x78]
jg 0x4b5571
push 4
lea eax, [ebp - 0x78]
push eax
push edi
push esi
push dword [ebp + 0xac]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp + 0xa0]
pop edi
xor ecx, ebp
pop esi
call fcn.0048bcc6
add ebp, 0xa4
leave
ret

Function at 0x4b559e
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x5d0]
xor ebx, ebx
cmp esi, ebx
je 0x4b55ee
mov eax, dword [edi + 0x44]
cmp eax, ebx
jne 0x4b55c1
cmp dword [edi + 0x40], ebx
je 0x4b55ee
cmp eax, ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
jne 0x4b55ce
mov eax, dword [edi + 0x40]
mov eax, dword [eax + 0x34]
push 0x4b5588
lea ecx, [ebp - 8]
push ecx
push eax
call fcn.004bc044
add esp, 0xc
cmp dword [ebp - 4], ebx
jne 0x4b55f6
mov dword [edi + 0x5d0], ebx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4b55ff
mov dword [eax], esi
cmp dword [esi + 0x17c], ebx
mov edi, dword [esi + 0x154]
jne 0x4b55ee
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4b55ee
mov eax, edi
jmp 0x4b55f1
Function at 0x4b5eb4
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
and dword [edi], 0
push dword [ebp + 8]
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x4b5f2a
cmp word [ebx + 8], 2
jne 0x4b5f0a
cmp word [ebx + 0xa], 4
jne 0x4b5f0a
mov esi, dword [ebx + 0xc]
jmp 0x4b5f04
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004b5e4f
test eax, eax
mov dword [edi], eax
je 0x4b5f25
lea edi, [eax + 0x1c]
add esi, 4
mov eax, dword [esi]
test eax, eax
jne 0x4b5ee8
push 0x400
push dword [ebx]
push 0x401
push dword [ebp + 0x18]
call fcn.0049c7eb
add esp, 0x10
xor eax, eax
jmp 0x4b5f50
push 8
pop eax
jmp 0x4b5f50
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x4b5f50
dec ecx
je 0x4b5f4b
dec ecx
je 0x4b5f44
dec ecx
jmp 0x4b5f50
mov eax, 0x2afb
jmp 0x4b5f50
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x18
Function at 0x4b654c
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
mov eax, dword [0x503454]
xor eax, ebp
mov dword [ebp + 0x1ac], eax
cmp dword [0x50a390], 0
mov dword [ebp - 0x80], 0x4df47c
mov dword [ebp - 0x7c], 0x4b610b
mov dword [ebp - 0x78], str.getnameinfo
mov dword [ebp - 0x74], 0x4b6392
mov dword [ebp - 0x70], 0x4df460
mov dword [ebp - 0x6c], fcn.004b60d2
jne 0x4b66b2
push 0x104
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
test eax, eax
je 0x4b66a8
push ebx
push esi
push edi
lea eax, [ebp - 0x68]
push eax
mov esi, 0x10c
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.004893ca
push str.ws2_32
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.0049c77a
mov ebx, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
add esp, 0x18
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, eax
test edi, edi
je 0x4b6615
push 0x4df47c
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
jne 0x4b6611
push edi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
xor edi, edi
test edi, edi
jne 0x4b6667
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.004893ca
push str.wship6
lea eax, [ebp + 0xa0]
push esi
push eax
call fcn.0049c77a
add esp, 0x18
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, eax
test edi, edi
je 0x4b66a5
push 0x4df47c
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
jne 0x4b6663
push edi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
xor edi, edi
test edi, edi
je 0x4b66a5
xor esi, esi
push dword [ebp + esi*8 - 0x80]
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
mov dword [ebp + esi*8 - 0x7c], eax
je 0x4b6684
inc esi
cmp esi, 3
jl 0x4b6669
jmp 0x4b668d
push edi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
xor edi, edi
test edi, edi
je 0x4b66a5
xor eax, eax
mov ecx, dword [ebp + eax - 0x7c]
mov dword [eax + 0x504850], ecx
add eax, 8
cmp eax, 0x18
jl 0x4b6693
pop edi
pop esi
pop ebx
mov dword [0x50a390], 1
movzx eax, word [ebp + 0x1b8]
mov ecx, dword [ebp + 0x1ac]
mov eax, dword [eax*8 + 0x504850]
xor ecx, ebp
call fcn.0048bcc6
add ebp, 0x1b0
leave
ret 4
Function at 0x4bd4f8
Capabilities:
Parse pe header

Disassembly:
movsx eax, byte [esp + 4]
add eax, 0xffffff9f
cmp eax, 0x19
ja case.default.0x4bd505
jmp dword [eax*4 + 0x4bd560]
mov al, 0x41
ret
mov al, 0x42
ret
mov al, 0x43
ret
mov al, 0x44
ret
mov al, 0x45
ret
mov al, 0x46
ret
mov al, 0x47
ret
mov al, 0x48
ret
mov al, 0x49
ret
mov al, 0x4a
ret
mov al, 0x4b
ret
mov al, 0x4c
ret
mov al, 0x4d
ret
mov al, 0x4e
ret
mov al, 0x4f
ret
mov al, 0x50
ret
mov al, 0x51
ret
mov al, 0x52
ret
mov al, 0x53
ret
mov al, 0x54
ret
mov al, 0x55
ret
mov al, 0x56
ret
mov al, 0x57
ret
mov al, 0x58
ret
mov al, 0x59
ret
mov al, 0x5a
ret
mov al, byte [esp + 4]
ret

Function at 0x4c126a
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esi]
cmp dword [eax + 4], 2
push edi
jne 0x4c128f
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x4c127e
xor eax, eax
pop edi
ret
push dword [eax + 8]
push dword [esp + 0x10]
push 1
push dword [esp + 0x14]
call ecx
jmp 0x4c12c2
cmp dword [esi + 8], 0
jne 0x4c12b0
push 0x4efb2c
push dword [eax + 8]
call fcn.0048a345
test eax, eax
pop ecx
pop ecx
mov dword [esi + 8], eax
jne 0x4c12b0
or eax, 0xffffffff
pop edi
ret
push dword [esi + 8]
push dword [esp + 0x10]
push 1
push dword [esp + 0x14]
call fcn.00489c7a
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4c12e2
mov eax, dword [esi + 8]
test eax, eax
je 0x4c12dc
push eax
call fcn.00489d07
and dword [esi + 8], edi
pop ecx
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
mov eax, edi
pop edi
ret
Function at 0x4c5160
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], 0
mov edx, dword [ebp + 8]
mov dword [edx + 0x5c], 0
mov eax, dword [ebp + 8]
mov dword [eax], 0x67452301
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], 0xefcdab89
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0x98badcfe
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0x10325476
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], 0xc3d2e1f0
mov edx, dword [ebp + 8]
mov dword [edx + 0x60], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x64], 0
pop ebp
ret
Function at 0x4c8ae0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4fbf48
push 0x48bb30
mov eax, dword fs:[0]
push eax
add esp, 0xffffffe4
push ebx
push esi
push edi
mov eax, dword [0x503454]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 8], 0
je 0x4c8b3a
cmp dword [ebp + 0xc], 0
je 0x4c8b3a
cmp dword [ebp + 0x10], 1
jae 0x4c8b3f
jmp 0x4c8c1d
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 1
jb 0x4c8b61
mov ecx, dword [ebp + 0x10]
sub ecx, 1
cmp dword [ebp - 0x1c], ecx
jbe 0x4c8b66
jmp 0x4c8c1d
mov dword [ebp - 4], 0
xor ecx, ecx
mov eax, dword [ebp - 0x1c]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004827bc
add esp, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4c8ba1
mov dword [ebp - 4], 0xfffffffe
jmp 0x4c8c1d
mov ecx, dword [ebp - 0x1c]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x20]
push edx
call fcn.004857c0
add esp, 0xc
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4c8bfd
mov eax, dword [ebp + 0x10]
sub eax, 1
cmp dword [ebp - 0x1c], eax
ja 0x4c8bfd
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0x10]
sub eax, 1
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00487869
add esp, 0x10
mov dword [ebp - 0x24], 1
mov dword [ebp - 4], 0xfffffffe
jmp 0x4c8c1d
cmp dword [ebp - 0x20], 0
je 0x4c8c3c
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00483868
add esp, 4
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c8cb0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x503454]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, dword [ebp + 8]
call fcn.00414f57
movzx eax, al
test eax, eax
je 0x4c8cda
xor eax, eax
jmp 0x4c8f42
mov word [ebp - 0x218], 0
push 0x208
push 0
lea ecx, [ebp - 0x216]
push ecx
call fcn.004857c0
add esp, 0xc
push 0x4e537c
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8d4b
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e53a0
call fcn.004c8ae0
add esp, 0xc
test eax, eax
jne 0x4c8d31
xor eax, eax
jmp 0x4c8f42
lea eax, [ebp - 0x218]
push eax
push 0x4e53c4
mov ecx, dword [ebp + 8]
push ecx
call fcn.00434e85
jmp 0x4c8f31
push 0x4e53e8
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8d9d
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e53fc
call fcn.004c8ae0
add esp, 0xc
test eax, eax
jne 0x4c8d83
xor eax, eax
jmp 0x4c8f42
lea eax, [ebp - 0x218]
push eax
push 0x4e5410
mov ecx, dword [ebp + 8]
push ecx
call fcn.00434e85
jmp 0x4c8f31
push 0x4e5424
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8def
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e5434
call fcn.004c8ae0
add esp, 0xc
test eax, eax
jne 0x4c8dd5
xor eax, eax
jmp 0x4c8f42
lea eax, [ebp - 0x218]
push eax
push 0x4e5444
mov ecx, dword [ebp + 8]
push ecx
call fcn.00434e85
jmp 0x4c8f31
push 0x4e5454
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8e3a
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
test eax, eax
ja 0x4c8e20
xor eax, eax
jmp 0x4c8f42
lea eax, [ebp - 0x218]
push eax
push 0x4e5468
mov ecx, dword [ebp + 8]
push ecx
call fcn.00434e85
jmp 0x4c8f31
push 0x4e547c
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8e85
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
test eax, eax
ja 0x4c8e6b
xor eax, eax
jmp 0x4c8f42
lea eax, [ebp - 0x218]
push eax
push 0x4e5490
mov ecx, dword [ebp + 8]
push ecx
call fcn.00434e85
jmp 0x4c8f31
push 0x4e54a4
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8ee7
push 0x20a
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.004857c0
add esp, 0xc
push 0x105
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x218]
push edx
push 0x4e54b8
mov eax, dword [ebp + 8]
push eax
call fcn.00434e85
jmp 0x4c8f31
push 0x4e54cc
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00414ef4
cmp eax, 0xffffffff
je 0x4c8f31
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push 0x4e54e8
call fcn.004c8ae0
add esp, 0xc
test eax, eax
jne 0x4c8f1c
xor eax, eax
jmp 0x4c8f42
lea edx, [ebp - 0x218]
push edx
push str._Systemroot_
mov eax, dword [ebp + 8]
push eax
call fcn.00434e85
mov ecx, dword [ebp + 8]
push ecx
call fcn.004c8c60
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048bcc6
mov esp, ebp
pop ebp
ret