joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4043f1
Capabilities:
Check if file exists
Query environment variable
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
push ebx
push esi
mov ebx, ecx
xor esi, esi
cmp dword [ebx + 0x10], esi
push edi
jne 0x40456d
lea eax, [ebp - 4]
push eax
push 0x41d008
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jl 0x404532
xor eax, eax
mov word [ebp - 0x254], si
mov ecx, 0x81
lea edi, [ebp - 0x252]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 8]
push eax
push esi
push str.Path
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x104
mov dword [ebp - 8], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, esi
jl 0x404532
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.MSVCR71.dll_wcslen]
test eax, eax
pop ecx
jbe 0x40456d
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40456d
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x41cff4
lea eax, [ebp - 0x254]
push eax
call edi
push str.asyn_download_interface.dll
lea eax, [ebp - 0x254]
push eax
call edi
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0xf
mov dword [ebx + 0x10], eax
pop ecx
xor eax, eax
mov word [ebp - 0x4c], si
lea edi, [ebp - 0x4a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x20
lea eax, [ebp - 0x4c]
push eax
push str.hasyn_download_interface
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.MSVCR71.dll__wtol]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
pop ecx
jne 0x40455d
mov edi, dword [ebx + 0x10]
push str.register_callback_func
push edi
call esi
test eax, eax
je 0x404526
push 0x40438d
call eax
push str.init
push edi
call esi
test eax, eax
jne 0x404536
xor eax, eax
jmp 0x404570
push 0
call eax
test eax, eax
jne 0x40455d
push 0xa
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.MSVCR71.dll__ultow]
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
push str.hasyn_download_interface
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push str.start_process_thread
push dword [ebx + 0x10]
call esi
test eax, eax
je 0x40456d
call eax
mov eax, dword [ebx + 0x10]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405f6d
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x41a3c1
call fcn.0040e0b0
sub esp, 0x420
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
je 0x40608a
cmp dword [ebp + 0x10], ebx
je 0x40608a
mov esi, dword [ecx + 0x18]
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x10]
add ecx, 0x14
push eax
mov dword [ebp - 0x18], ecx
call fcn.00404e1f
cmp dword [eax], esi
je 0x405fb7
mov eax, 0x80004005
jmp 0x40608f
push edi
push dword [ebp + 0x10]
mov esi, 0x81
xor eax, eax
mov word [ebp - 0x224], bx
mov ecx, esi
lea edi, [ebp - 0x222]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
xor eax, eax
mov word [ebp - 0x42c], bx
mov ecx, esi
lea edi, [ebp - 0x42a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x1c
call fcn.0040deb6
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, ebx
mov edi, dword [ebp + 8]
mov dword [ebp - 4], ebx
je 0x406037
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.00404895
mov esi, eax
jmp 0x406039
xor esi, esi
mov eax, dword [esi]
or dword [ebp - 4], 0xffffffff
mov ecx, esi
call dword [eax]
test eax, eax
jl 0x406077
cmp dword [esi + 0x10], 1
jne 0x406077
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], esi
call fcn.0040519c
push 0x405915
push 0x1f4
push edi
push ebx
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x406085
mov ecx, esi
call fcn.00404362
push esi
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
pop ecx
xor eax, eax
pop edi
jmp 0x40608f
mov eax, 0x80070057
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc

Function at 0x40701b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push edi
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x104], 0
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
push 0x2b
lea eax, [ebp - 0x104]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x407056
inc eax
jmp 0x4070ab
lea eax, [ebp - 0x104]
push 0x41d17c
push eax
call sub.MSVCR71.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
jne 0x407081
push 2
pop eax
jmp 0x4070ab
push esi
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x407095
push 3
pop esi
jmp 0x4070a1
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call eax
pop ecx
pop ecx
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
pop esi
pop edi
leave
ret
Function at 0x40714f
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov word [ebp - 0x214], bx
mov ecx, 0x81
lea edi, [ebp - 0x212]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x214]
push eax
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
mov dword [ebp - 8], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
cmp esi, ebx
je 0x4071b7
lea eax, [esi + esi]
push eax
call fcn.0040e008
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4071bb
xor eax, eax
jmp 0x407222
push edi
push esi
push ebx
lea eax, [ebp - 0x214]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
jne 0x4071d2
xor esi, esi
jmp 0x407219
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x41cf30
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4071ce
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0xc]
push ecx
movzx ecx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
push eax
push str._d._d._d._d
push 0x168
mov esi, 0x428730
push esi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x1c
push edi
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40727f
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push esi
mov esi, ecx
mov eax, dword [esi + 0x20]
test eax, eax
jne 0x407360
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x407360
and dword [ebp - 0xc], 0
push ebx
lea ecx, [ebp - 0xc]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, dword [eax]
test ebx, ebx
je 0x40735c
and word [ebp - 0x214], 0
push edi
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x212]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x214]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [ebp - 0x214]
push eax
call edi
push ebx
mov dword [ebp - 4], eax
call edi
mov edi, dword [sym.imp.MSVCR71.dll__wcsicmp]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x214]
push ebx
push eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x407337
push ebx
push dword [ebp - 4]
call edi
test eax, eax
pop ecx
pop ecx
je 0x407337
cmp dword [ebp - 8], 0
je 0x40735b
push dword [ebp - 8]
push dword [ebp - 4]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x40735b
push ebx
call dword [sym.imp.MSVCR71.dll_wcslen]
pop ecx
mov ecx, dword [esi + 0x1c]
lea eax, [ecx + eax*2]
mov dword [esi + 0x20], eax
jmp 0x407351
add dword [esi + 0x20], 2
mov eax, dword [esi + 0x20]
cmp word [eax], 0x20
jne 0x40734a
add dword [esi + 0x20], 2
pop edi
mov eax, dword [esi + 0x20]
pop ebx
pop esi
leave
ret
Function at 0x407489
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetSystemMenu]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.USER32.dll_LoadMenuW]
mov ebx, eax
push esi
push ebx
call dword [sym.imp.USER32.dll_GetSubMenu]
mov edi, eax
cmp edi, esi
je 0x4075ba
push 1
push esi
push edi
call dword [sym.imp.USER32.dll_SetMenuDefaultItem]
lea eax, [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push esi
push dword [ebp + 8]
push dword [ebp - 4]
push dword [ebp - 8]
push 0x1a0
push edi
call dword [sym.imp.USER32.dll_TrackPopupMenuEx]
push ebx
mov edi, eax
call dword [sym.imp.USER32.dll_DestroyMenu]
cmp edi, 0x69
jne 0x40750f
push str._sstartfrom_Startup_xmp
jmp 0x4075a5
cmp edi, 0x8003
jne 0x407551
call fcn.0040ad2f
mov ecx, eax
call fcn.0040a507
test eax, eax
je 0x4075b1
push 0x44
push 0x41d360
push 0x41d324
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
je 0x4075ba
call fcn.0040ad2f
mov ecx, eax
call fcn.0040a4e5
jmp 0x4075b1
cmp edi, 0x8006
jne 0x407574
push 1
push esi
push str.http:__www.xunlei.com__id141
push str.iexplore
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
jmp 0x4075ba
cmp edi, 0x8007
jne 0x407586
push 1
push esi
push str.http:__tantan.xunlei.com_feedback.html_fromxmp
jmp 0x407561
cmp edi, 0x8008
jne 0x407598
push 1
push esi
push str.http:__dl.xunlei.com_xmp.html_fromxmpmenu
jmp 0x407561
cmp edi, 0x8005
jne 0x4075ba
push str._sstartfrom_Startup_xmp__ssysconfig_xmp
call fcn.0040ad2f
mov ecx, eax
call fcn.0040a2f5
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DestroyWindow]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x407d7e
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x41a470
call fcn.0040e0b0
sub esp, 0x20c
push ebx
push esi
push edi
push str.TaskbarCreated
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push 0x10
mov dword [0x42870c], eax
call fcn.0040deb6
pop ecx
mov dword [ebp - 0x10], eax
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x407dbe
mov ecx, eax
call fcn.00406fe7
jmp 0x407dc0
xor eax, eax
mov edi, dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
push ebx
push edi
mov dword [0x428710], eax
call fcn.004073a4
pop ecx
pop ecx
call fcn.0040ad2f
mov ecx, eax
call fcn.0040a46a
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push ebx
push 0x1d4c0
push 0x3ea
push edi
call esi
push ebx
push 0x493e0
push 0x3e8
push edi
call esi
push ebx
push 0x1d4de
push 0x3e9
push edi
call esi
xor eax, eax
mov word [ebp - 0x218], bx
mov ecx, 0x81
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str...xmp.ini
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea eax, [ebp - 0x218]
push eax
push 0xb4
push str.RunMainTrayXar
mov ebx, str.TimerSetting
push ebx
call edi
cmp eax, 0x1e
jae 0x407e75
push 0x1e
pop eax
imul eax, eax, 0x3e8
push 0
push eax
push 0x3eb
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x218]
push eax
push 0xf0
push str.UpdateCodecs
push ebx
call edi
cmp eax, 0x1e
jae 0x407ea4
push 0x1e
pop eax
imul eax, eax, 0x3e8
push 0
push eax
push 0x3ec
push dword [ebp + 8]
call esi
push str._src:XMPTray__force
call fcn.00407baa
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40829a
Capabilities:
Check if file exists
Get common file path
Link many functions at runtime
Query or enumerate registry value
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x624
and word [ebp - 0x214], 0
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov esi, ecx
mov ebx, 0x81
xor eax, eax
mov ecx, ebx
lea edi, [ebp - 0x212]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x2001f
xor edi, edi
push str.SoftwareThunder_NetworkXmp
inc edi
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 4]
mov dword [ebp - 0xc], 0x104
mov dword [ebp - 8], edi
call fcn.00401492
test eax, eax
jne 0x4083df
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 8]
push eax
push 0
push str.InstDir
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4083df
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, edi
jne 0x4083df
and word [ebp - 0x41c], 0
xor eax, eax
mov ecx, ebx
lea edi, [ebp - 0x41a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
pop ecx
pop ecx
push str.ProgramXLBugHandler.dll
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x4083d1
and word [ebp - 0x624], 0
xor eax, eax
mov ecx, ebx
lea edi, [ebp - 0x622]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x624]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x214]
push eax
call edi
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x18], eax
lea eax, [ebp - 0x624]
push eax
call edi
jmp 0x4083df
push str.XLBugHandler.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x4083ea
xor esi, esi
jmp 0x40843e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._XL_SetBugReportRootDir_4
push eax
call edi
push str._XL_InitBugHandler_20
push dword [esi + 0x18]
mov dword [esi], eax
call edi
push str._XL_SetPeerID_4
push dword [esi + 0x18]
mov dword [esi + 4], eax
call edi
push str._XL_SetReportShowMode_4
push dword [esi + 0x18]
mov dword [esi + 8], eax
call edi
push str._XL_SetAlwaysSendReport_4
push dword [esi + 0x18]
mov dword [esi + 0xc], eax
call edi
push str._XL_SetReportPath_4
push dword [esi + 0x18]
mov dword [esi + 0x10], eax
call edi
mov dword [esi + 0x14], eax
xor esi, esi
inc esi
lea ecx, [ebp - 4]
call fcn.004013bf
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40963f
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x41a566
call fcn.0040e0b0
sub esp, 0x224
mov eax, dword [ecx + 0x1c]
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x1c], ecx
jne 0x409663
xor eax, eax
jmp 0x4097e7
push ebx
push esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x20]
push ecx
push eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], edi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
mov ebx, dword [esi]
test ebx, ebx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], edi
je 0x409715
and word [ebp - 0x230], 0
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x22e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x230]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [ebp - 0x230]
push eax
call esi
push ebx
mov edi, eax
call esi
mov esi, dword [sym.imp.MSVCR71.dll__wcsicmp]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x230]
push ebx
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x409708
push ebx
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x409708
cmp dword [ebp - 0x24], 0
je 0x40970f
push dword [ebp - 0x24]
push edi
call esi
test eax, eax
pop ecx
pop ecx
jne 0x40970f
mov dword [ebp - 0x10], 1
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x10]
cmp edi, dword [ebp - 0x20]
jge 0x4097d2
lea eax, [edi + 1]
mov dword [ebp - 0x10], eax
mov ebx, 0x41d6d8
mov eax, dword [esi + edi*4]
mov cx, word [eax]
cmp cx, 0x2f
je 0x409768
cmp cx, 0x2d
je 0x409768
push eax
lea ecx, [ebp - 0x18]
call fcn.00404104
cmp dword [ebp - 0x18], 0
je 0x4097c5
push dword [ebp - 0x18]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jbe 0x4097c5
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
add ecx, 0xc
call fcn.004095d5
jmp 0x4097c5
add eax, 2
push eax
lea ecx, [ebp - 0x14]
call fcn.00404104
lea ecx, [ebp - 0x14]
call fcn.00407116
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jge 0x4097b1
mov eax, dword [esi + edi*4 + 4]
mov cx, word [eax]
cmp cx, 0x2d
je 0x4097b1
cmp cx, 0x2f
je 0x4097b1
mov ecx, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040954e
mov ecx, eax
call fcn.00404104
inc edi
inc dword [ebp - 0x10]
jmp 0x4097c5
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push ebx
push eax
call fcn.0040954e
mov ecx, eax
call fcn.00407d05
inc edi
inc dword [ebp - 0x10]
cmp edi, dword [ebp - 0x20]
jl 0x409729
push dword [ebp - 0x18]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push dword [ebp - 0x14]
call esi
xor eax, eax
pop esi
inc eax
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
leave
ret
Function at 0x40997d
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x41a5ba
call fcn.0040e0b0
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], edi
call fcn.00408a5e
xor ebx, ebx
lea esi, [edi + 0xc]
mov dword [ebp - 4], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00409039
mov ecx, esi
call fcn.00409521
mov eax, dword [ebp + 8]
cmp eax, ebx
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x20], ebx
jne 0x4099cb
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ecx, edi
call fcn.00409912
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x4099e6
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
mov eax, 0x41a5d4
call fcn.0040e0b0
sub esp, 0x34
push ebx
push esi
push 0x41d77c
push 0x428578
push str.mutex_s__s
push 0x104
mov esi, 0x428a08
push esi
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x14
push esi
push 1
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
je 0x409a3a
call esi
cmp eax, 5
jne 0x409a41
mov al, 1
jmp 0x409b04
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push ebx
push str.XMP_CMD_HELPER31317078_984A_425a_A01C_6071F056D50F
mov esi, eax
call dword [sym.imp.USER32.dll_FindWindowW]
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x409a92
push edi
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
mov dword [ebp - 0x1c], 0x800
call dword [sym.imp.MSVCR71.dll_wcslen]
lea eax, [eax + eax + 2]
pop ecx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push 0x4a
push dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov al, 1
pop edi
jmp 0x409b04
push esi
lea ecx, [ebp - 0x40]
call fcn.0040997d
push str.embedding
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], ebx
call fcn.004098af
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.00407933
test eax, eax
ja 0x409ac4
cmp dword [ebp - 0x38], ebx
jle 0x409aed
cmp dword [ebp - 0x10], ebx
je 0x409ad6
push dword [ebp - 0x10]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp eax, ebx
ja 0x409aed
lea ecx, [ebp - 0x40]
call fcn.0040727f
push eax
call fcn.0040ad2f
mov ecx, eax
call fcn.0040a2f5
mov bl, 1
push dword [ebp - 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004098d5
mov al, bl
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x409d1d
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push esi
mov esi, ecx
or dword [esi], 0xffffffff
and dword [esi + 0x1c], 0
push 0xc8
lea eax, [esi + 0x20]
push str.stat.kankanc2c.xunlei.com
push eax
mov dword [esi + 4], 0xbb8
mov dword [esi + 8], 1
call dword [sym.imp.MSVCR71.dll_strncpy]
push 0x18e
lea eax, [ebp - 0x190]
push 0
push eax
mov word [esi + 0xe8], 0x4a34
call sub.MSVCR71.dll_memset
add esp, 0x18
lea eax, [ebp - 0x190]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov eax, esi
pop esi
leave
ret

Function at 0x409dd8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], ebx
cmp byte [0x429048], bl
push esi
mov esi, 0x429048
jne 0x409e3b
lea eax, [ebp - 4]
push eax
push 1
push ebx
push str.SOFTWAREThunder_NetworkXmp
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409e3b
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push ebx
push str.PeerID
push dword [ebp - 4]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], 0x40
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
push esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [ebp + 8]
pop esi
pop ebx
leave
ret
Function at 0x409e4c
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push esi
xor esi, esi
cmp word [0x429090], si
jne 0x409f7e
push ebx
push edi
xor eax, eax
mov word [ebp - 0x214], si
mov ecx, 0x81
lea edi, [ebp - 0x212]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x214]
push eax
push esi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
call edi
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.MSVCR71.dll_wcslen]
pop ecx
lea eax, [ebp + eax*2 - 0x214]
dec eax
dec eax
cmp word [eax], 0x5c
jne 0x409eb0
add eax, 2
push str.XmpCoreVersion.dll
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
lea eax, [ebp - 0x214]
push esi
push eax
call dword [sym.imp.MSVCR71.dll__waccess]
add esp, 0x10
test eax, eax
je 0x409ee7
push ebx
lea eax, [ebp - 0x214]
push eax
push esi
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
mov dword [ebp - 8], esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, esi
jbe 0x409f7c
lea eax, [edi + edi]
push eax
call fcn.0040e008
mov ebx, eax
cmp ebx, esi
pop ecx
je 0x409f7c
push ebx
push edi
push esi
lea eax, [ebp - 0x214]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x409f7c
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x41cf30
push ebx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x409f7c
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0xc]
push ecx
movzx ecx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
push eax
push str._d._d._d._d
push 0x168
push 0x429090
call dword [sym.imp.MSVCR71.dll__snwprintf]
mov eax, dword [ebp - 4]
mov ax, word [eax + 0xc]
push ebx
mov word [0x429088], ax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 0x20
pop edi
pop ebx
mov ax, word [0x429088]
pop esi
leave
ret