joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4010b0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
mov eax, dword [ebx + 0x10]
test eax, eax
mov dword [esp + 4], 0
je 0x401105
cmp dword [eax], 0xffffffff
jne 0x401105
mov edx, dword [eax + 0x10]
sub edx, dword [eax + 4]
mov dword [esp + 4], edx
je 0x40116e
cmp edx, 0x200
jb 0x4010eb
mov edx, 0x200
mov dword [esp + 4], edx
push esi
mov esi, dword [eax + 4]
push edi
mov edi, dword [esp + 0x18]
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x10]
add dword [eax + 4], edx
pop edi
pop esi
jmp 0x40112c
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x40116e
mov ecx, dword [ebx + 0x18]
cmp ecx, dword [ebx + 0x14]
jae 0x40116e
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 8]
push edx
push 0x200
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 1
add word [ebx + 0x1c], ax
add dword [ebx + 0x18], eax
cmp dword [esp + 4], 0x200
jae 0x40114c
mov ebx, dword [ebx + 0x10]
test ebx, ebx
je 0x40114c
mov dword [ebx + 8], eax
mov edx, dword [0x4104b0]
push 0
push 0
push 0x405
push 0x3ee
push edx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov eax, dword [esp + 4]
pop ebx
pop ecx
ret
xor eax, eax
pop ebx
pop ecx
ret

Function at 0x401180
Capabilities:
Create udp socket

Disassembly:
sub esp, 0x14
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0x10], eax
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x4104ac], eax
xor eax, eax
mov dword [esp], eax
push eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov word [esp + 4], 2
call dword [sym.imp.WS2_32.dll_htonl]
push 0x3d4
mov dword [esp + 8], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [0x4104ac]
mov word [esp + 2], ax
push 0x10
lea eax, [esp + 4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
mov edx, dword [0x4104ac]
jge 0x40122a
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [0x4104b0]
push 0x10
push 0x40a2b4
push 0x40a2a4
push eax
mov dword [0x4104ac], 0xffffffff
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.0040332a
add esp, 0x14
ret
mov ecx, dword [0x4104b0]
push 1
push 0x464
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov ecx, dword [esp + 0x10]
xor ecx, esp
mov eax, 1
call fcn.0040332a
add esp, 0x14
ret
Function at 0x4015c0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x30
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0x2c], eax
push edi
mov edi, dword [esp + 0x38]
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SoftwareOurselecNKDownloadRecent_Files
push bind
mov dword [edi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40160b
xor eax, eax
pop edi
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.0040332a
add esp, 0x30
ret
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
push esi
xor ebx, ebx
xor esi, esi
test ebx, ebx
jne 0x401660
push esi
lea ecx, [esp + 0x20]
push str.RecentFiles__02d_
push ecx
mov dword [esp + 0x20], 0x104
call ebp
add esp, 0xc
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
push edi
lea eax, [esp + 0x20]
push eax
push ebx
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
add esi, 1
add edi, 0x104
cmp esi, 0xa
mov ebx, eax
jb 0x401618
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov eax, esi
je 0x401674
lea eax, [esi - 1]
mov ecx, dword [esp + 0x3c]
pop esi
pop ebp
pop ebx
pop edi
xor ecx, esp
call fcn.0040332a
add esp, 0x30
ret
Function at 0x401710
Capabilities:
Read file on windows
Set current directory

Disassembly:
sub esp, 0x110
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0x10c], eax
mov eax, dword [esp + 0x114]
push ebx
push ebp
mov ebp, dword [esp + 0x120]
push esi
push eax
lea eax, [esp + 0x18]
mov ebx, 1
push eax
mov dword [esp + 0x14], ebx
mov dword [ebp], 0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x14]
mov eax, ecx
lea esi, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x401760
sub eax, esi
lea esi, [esp + eax + 0x14]
lea edx, [esp + 0x14]
cmp esi, edx
jbe 0x40179f
cmp byte [esi], 0x5c
je 0x401788
sub esi, ebx
lea eax, [esp + 0x14]
cmp esi, eax
ja 0x401777
jmp 0x40179f
lea edx, [esp + 0x14]
cmp esi, edx
jbe 0x40179f
mov eax, edx
push eax
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esi + 1]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4017a4
sub eax, esi
add eax, ecx
cmp eax, ecx
jbe 0x4017c0
cmp byte [eax], 0x2e
je 0x4017c9
sub eax, ebx
cmp eax, ecx
ja 0x4017b5
cmp byte [eax], 0x2e
jne 0x4018f1
mov dl, byte [eax + 1]
cmp dl, 0x6c
je 0x4017da
cmp dl, 0x4c
jne 0x4018f1
mov dl, byte [eax + 2]
cmp dl, 0x73
je 0x4017eb
cmp dl, 0x53
jne 0x4018f1
mov al, byte [eax + 3]
cmp al, 0x74
je 0x4017fa
cmp al, 0x54
jne 0x4018f1
push 0
push 0x80
push 3
push 0
push 0
push bind
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4018f1
cmp dword [ebp], 0x19
jae 0x4018c9
push edi
jmp 0x401830
test ebx, ebx
je 0x4018c8
cmp dword [esp + 0x10], 0
je 0x4018c8
mov ecx, dword [ebp]
imul ecx, ecx, 0x104
lea esi, [ecx + ebp + 0x68]
xor edi, edi
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x14]
push edx
push 1
push esi
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test ebx, ebx
je 0x40189b
cmp dword [esp + 0x10], 0
je 0x40189b
mov al, byte [esi]
cmp al, 0xd
je 0x40189b
cmp al, 0x2b
je 0x40188a
cmp al, 0xa
jne 0x40188d
sub esi, 1
add edi, 1
add esi, 1
cmp edi, 0x103
jb 0x401852
mov ecx, dword [ebp]
imul ecx, ecx, 0x104
lea edx, [ecx + ebp + 0x68]
cmp esi, edx
je 0x4018be
mov byte [esi], 0
mov eax, dword [ebp]
mov dword [ebp + eax*4 + 4], 1
add dword [ebp], 1
cmp dword [ebp], 0x19
jb 0x401830
pop edi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.0040332a
add esp, 0x110
ret
mov ecx, dword [esp + 0x118]
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040332a
add esp, 0x110
ret
Function at 0x401dc0
Capabilities:
Get file version info
Get graphical window text

Disassembly:
sub esp, 0x218
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0x214], eax
mov ecx, dword [0x40ead0]
push edi
mov edi, dword [esp + 0x220]
push 0x104
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x14]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 4], eax
jbe 0x401ee1
push esi
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x401ee0
mov ecx, dword [esp + 8]
push esi
push ecx
push 0
lea edx, [esp + 0x20]
push edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x401ee0
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x10]
push ecx
push str.StringFileInfo080404b0ProductVersion
push esi
call sub.VERSION.dll_VerQueryValueA
mov edx, dword [esp + 0xc]
mov byte [esp + 0x14], 0x20
mov byte [esp + 0x15], 0x76
mov cl, byte [edx]
test cl, cl
lea eax, [esp + 0x16]
je 0x401ea0
push ebx
lea ebx, [ebx]
lea ebx, [esp + 0x11b]
cmp eax, ebx
jae 0x401e9f
add edx, 1
cmp cl, 0x20
mov byte [eax], cl
mov dword [esp + 0x10], edx
jne 0x401e8e
sub eax, 1
jmp 0x401e96
cmp cl, 0x2c
jne 0x401e96
mov byte [eax], 0x2e
mov cl, byte [edx]
add eax, 1
test cl, cl
jne 0x401e70
pop ebx
push 0x104
lea edx, [esp + 0x11c]
push edx
push edi
mov byte [eax], 0
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x118]
push edx
push edi
call dword [sym.imp.USER32.dll_SetWindowTextA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
mov ecx, dword [esp + 0x218]
pop edi
xor ecx, esp
call fcn.0040332a
add esp, 0x218
ret
Function at 0x402020
Capabilities:
Delete registry key
Set registry value

Disassembly:
sub esp, 0xa58
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0xa54], eax
push ebx
push esi
mov esi, dword [esp + 0xa64]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x10], esi
call fcn.004015c0
mov ebx, eax
add esp, 4
test ebx, ebx
jbe 0x402064
push str.SoftwareOurselecNKDownloadRecent_Files
push bind
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test esi, esi
je 0x402150
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0xc]
push edx
push 0
push 0x20006
push 0
push 0
push 0
push str.SoftwareOurselecNKDownloadRecent_Files
push bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4020b0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xa54]
xor ecx, esp
call fcn.0040332a
add esp, 0xa58
ret
push ebp
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
push edi
push 0
lea eax, [esp + 0x20]
push str.RecentFiles__02d_
push eax
call ebp
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x10]
push eax
push esi
push 1
push 0
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp ebx, 0xa
jb 0x4020ee
sub ebx, 1
xor edi, edi
test ebx, ebx
jbe 0x402143
lea esi, [esp + 0x3c]
mov eax, dword [esp + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402138
add edi, 1
push edi
lea ecx, [esp + 0x20]
push str.RecentFiles__02d_
push ecx
call ebp
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [esp + 0x14]
push esi
push 1
push 0
lea edx, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add esi, 0x104
sub ebx, 1
jne 0x4020f8
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebp
mov ecx, dword [esp + 0xa5c]
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0040332a
add esp, 0xa58
ret
Function at 0x4025f0
Capabilities:
Get file size

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x10]
xor ebx, ebx
cmp eax, ebx
push edi
jne 0x4026f1
cmp dword [0x40eae0], ebx
jbe 0x402661
push 0x19e8
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebx
je 0x40265b
push edi
push 0x40eae0
call fcn.00401910
add esp, 8
test eax, eax
je 0x402654
push edi
call fcn.00402170
add esp, 4
test eax, eax
je 0x402654
mov dword [esi + 0x10], edi
mov eax, dword [edi + 0x20]
mov dword [esi], eax
mov ecx, dword [edi + 0x14]
mov dword [esi + 0xc], ecx
mov edx, dword [edi + 0x18]
mov dword [esi + 0x14], edx
jmp 0x402696
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebx
ret
mov eax, dword [esp + 0x14]
push ebx
push 0x80
push 3
push ebx
push ebx
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x40265b
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0xc], eax
shr eax, 9
add eax, 1
mov dword [esi + 0x14], eax
mov ecx, dword [esi + 0x14]
mov edi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push ecx
push ebx
push 0x406
mov dword [esi + 0x18], ebx
mov dword [esi + 4], ebx
mov edx, dword [0x4104b0]
push 0x3ee
push edx
call edi
mov eax, dword [0x4104b0]
push ebx
push 1
push 0x404
push 0x3ee
push eax
call edi
mov ecx, dword [0x4104b0]
push ebx
push ebx
push 0x402
push 0x3ee
push ecx
call edi
pop edi
mov word [esi + 0x1c], bx
pop esi
mov eax, 1
pop ebx
ret
mov edx, dword [eax]
cmp edx, dword [eax + 0x1c]
jb 0x402701
cmp edx, 0xffffffff
jne 0x40265b
add dword [eax], 1
mov eax, dword [esi + 0x10]
mov dword [eax + 8], ebx
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
mov edx, dword [eax + ecx*4 + 0x20]
pop edi
mov word [esi + 0x1c], bx
mov dword [esi], edx
pop esi
mov eax, 1
pop ebx
ret
Function at 0x402a60
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x1a0
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [str.Courier_New]
push esi
mov ecx, dword [0x40a510]
mov edx, dword [0x40a514]
mov esi, dword [esp + 0x1a8]
mov dword [esp + 0x194], eax
lea eax, [esp + 0x194]
push eax
push 0
push 0
push 0
push 0
push 0x86
push 0
push 0
push 0
push 0x190
push 0
push 0
push 0
push 0xc
mov dword [esp + 0x1d0], ecx
mov dword [esp + 0x1d4], edx
mov byte [0x40e9c0], 0
call dword [sym.imp.GDI32.dll_CreateFontA]
test eax, eax
mov dword [0x40e748], eax
je 0x402b08
push edi
mov edi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 1
push eax
push 0x30
push 0x3ef
push esi
call edi
mov ecx, dword [0x40e748]
push 1
push ecx
push 0x30
push 0x3f0
push esi
call edi
pop edi
push 0x40e760
mov dword [0x40e780], 0
call fcn.00401040
push 0x40e760
call fcn.00402730
add esp, 8
lea edx, [esp + 4]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x402b68
push 0
push 0x40a268
push str.WSAStartup
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
mov ecx, dword [esp + 0x19c]
xor ecx, esp
call fcn.0040332a
add esp, 0x1a0
ret
mov ecx, dword [esp + 0x1a0]
pop esi
xor ecx, esp
mov eax, 1
call fcn.0040332a
add esp, 0x1a0
ret

Function at 0x40332a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40d018]
jne 0x403334
repz ret
jmp fcn.00403609
Function at 0x403b6e
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x40d028]
je 0x403b89
inc edi
cmp edi, 0x17
jb 0x403b7a
cmp edi, 0x17
jae 0x403d09
push ebp
push 3
call fcn.00405cb0
cmp eax, 1
pop ecx
je 0x403cd5
push 3
call fcn.00405cb0
test eax, eax
pop ecx
jne 0x403bbd
cmp dword [0x40d020], 1
je 0x403cd5
cmp ebx, 0xfc
je 0x403d08
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x40e060
push ebp
call fcn.00405c4b
add esp, 0xc
test eax, eax
je 0x403bf3
push esi
push esi
push esi
push esi
push esi
call fcn.004051aa
add esp, 0x14
push 0x104
mov esi, 0x40e079
push esi
push 0
mov byte [0x40e17d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403c37
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00405c4b
add esp, 0xc
test eax, eax
je 0x403c37
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004051aa
add esp, 0x14
push esi
call fcn.00405bc0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x403c7c
push esi
call fcn.00405bc0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x40e374
push 0x40ab4c
sub ecx, eax
push ecx
push eax
call fcn.00405b02
add esp, 0x14
test eax, eax
je 0x403c7c
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004051aa
add esp, 0x14
jmp 0x403c7e
xor esi, esi
push 0x40ab48
push ebx
push ebp
call fcn.00405a91
add esp, 0xc
test eax, eax
je 0x403c9e
push esi
push esi
push esi
push esi
push esi
call fcn.004051aa
add esp, 0x14
push dword [edi*8 + 0x40d02c]
push ebx
push ebp
call fcn.00405a91
add esp, 0xc
test eax, eax
je 0x403cc0
push esi
push esi
push esi
push esi
push esi
call fcn.004051aa
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004058d4
add esp, 0xc
jmp 0x403d08
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x403d08
cmp ebp, 0xffffffff
je 0x403d08
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x40d02c]
push dword [esi]
call fcn.00405bc0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4058d4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004046c6
xor ebx, ebx
cmp dword [0x40e620], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4059aa
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x405a8a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40ac78
push edi
call esi
cmp eax, ebx
je 0x405a8a
push eax
call fcn.00404658
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40e620], eax
call esi
push eax
call fcn.00404658
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40e624], eax
call esi
push eax
call fcn.00404658
mov dword [0x40e628], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004038fb
test eax, eax
pop ecx
pop ecx
je 0x405978
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004051aa
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4059aa
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00404658
cmp eax, ebx
pop ecx
mov dword [0x40e630], eax
je 0x4059aa
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00404658
pop ecx
mov dword [0x40e62c], eax
mov eax, dword [0x40e62c]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x405a2f
cmp dword [0x40e630], ecx
je 0x405a2f
push eax
call fcn.004046cf
push dword [0x40e630]
mov esi, eax
call fcn.004046cf
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x405a2f
cmp edi, ebx
je 0x405a2f
call esi
cmp eax, ebx
je 0x4059fc
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4059fc
test byte [ebp - 0x18], 1
jne 0x405a2f
lea eax, [ebp - 0x10]
push eax
call fcn.00403932
test eax, eax
pop ecx
je 0x405a17
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004051aa
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x405a26
or dword [ebp + 0x10], 0x200000
jmp 0x405a6a
or dword [ebp + 0x10], 0x40000
jmp 0x405a6a
mov eax, dword [0x40e624]
cmp eax, dword [ebp - 8]
je 0x405a6a
push eax
call fcn.004046cf
cmp eax, ebx
pop ecx
je 0x405a6a
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x405a6a
mov eax, dword [0x40e628]
cmp eax, dword [ebp - 8]
je 0x405a6a
push eax
call fcn.004046cf
cmp eax, ebx
pop ecx
je 0x405a6a
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40e620]
call fcn.004046cf
cmp eax, ebx
pop ecx
je 0x405a8a
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x405a8c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40359e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
pushal
call 0x4035ad
pop dword [ebp - 0x20]
mov eax, 0x4035ad
sub dword [ebp - 0x20], eax
mov dword [ebp - 0x30], 0x7ee3fdb7
add dword [ebp - 0x30], 0xcf6e4794
mov dword [ebp - 0x2c], 0xba2ec6ea
add dword [ebp - 0x2c], 0x7804855b
mov dword [ebp - 0x28], 0xb351563
sub dword [ebp - 0x28], 0xbee8d135
mov dword [ebp - 0x24], 0xb0fc1ea8
sub dword [ebp - 0x24], 0xb0fc1ea8
lea eax, [ebp - 0x30]
push eax
mov eax, 0xf762139d
add eax, 0x8de5c7f
add eax, dword [ebp - 0x20]
call dword [eax]
mov dword [ebp - 0x30], 0x5e825594
add dword [ebp - 0x30], 0x15f013c2
mov dword [ebp - 0x2c], 0x7602ceff
sub dword [ebp - 0x2c], 0x34966d8a
mov dword [ebp - 0x28], 0x8df66e3
add dword [ebp - 0x28], 0x5a900589
mov dword [ebp - 0x24], 0x7b5931e6
add dword [ebp - 0x24], 0x84a6ce1a
lea ebx, [ebp - 0x30]
push ebx
push eax
mov eax, 0x2eb17aa
sub eax, 0x2aaa78a
add eax, dword [ebp - 0x20]
call dword [eax]
push 0x40
push 0x1000
push 0x360de
push 0
call eax
mov ecx, 0xacae8fe9
sub ecx, 0xacae4e95
mov ebx, eax
mov edi, 0x40c800
add edi, dword [ebp - 0x20]
mov edx, 0x6efdf5dd
sub edx, 0x772e2cf5
sub dword [ebp - 0x1c], eax
mov esi, dword [edi]
sub esi, edx
xor dword [ebp - 0x10], ecx
mov dword [ebx], esi
sub dword [ebp - 0x14], 0x987a088
add ebx, 0x9c8e07db
add ebx, 0x6371f829
add edi, 0x1221c701
add edi, 0xedde3903
loop 0x4036c4
add eax, 0x1b9dcff6
sub eax, 0x1b9cd7d3
mov ebx, eax
add eax, 0xf0865c4f
sub eax, 0xf0865c4a
mov ecx, 0x5fa256de
sub ecx, 0x5f6256de
add ecx, dword [ebp - 0x20]
call ebx
leave
ret

Function at 0x4045f7
Capabilities:
Check if file exists

Disassembly:
push 0x1c
mov eax, 0x406af3
call fcn.004054fb
cmp dword [0x40a010], 0
mov esi, dword [ebp + 8]
jne 0x404616
mov al, 1
jmp 0x4046e2
test esi, esi
je 0x4046e0
xor ebx, ebx
cmp word [esi], bx
je 0x4046e0
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4046e0
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x4046e0
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.0040359e
pop ecx
pop ecx
mov esi, dword [0x40a010]
xor edi, edi
inc edi
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x18], ebx
je 0x4046d1
lea eax, [ebp - 0x28]
push eax
call fcn.0040359e
pop ecx
test al, al
jne 0x4046d1
cmp dword [ebp - 0x18], esi
jbe 0x4046d1
cmp dword [0x40a014], 8
lea eax, [ebp - 0x28]
mov ecx, section..data
cmovae ecx, dword [section..data]
cmp dword [ebp - 0x14], 8
push esi
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4046d1
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
test eax, eax
je 0x4046d1
push 0x4075c8
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
movzx ebx, bl
pop ecx
pop ecx
cmovne ebx, edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], edi
call fcn.0040359e
mov al, bl
jmp 0x4046e2
xor al, al
call fcn.004054b6
ret
Function at 0x40477f
Capabilities:
Accept command line arguments
Check if file exists

Disassembly:
push 0x230
mov eax, 0x406b23
call fcn.004054fb
xor eax, eax
mov byte [ebp - 0x231], al
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.kernel32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
test ebx, ebx
je 0x4048fd
push str.__alloweddir
mov byte [ebp - 0x231], 1
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov esi, eax
xor eax, eax
mov edi, eax
mov dword [ebp - 0x238], esi
pop ecx
cmp dword [ebp - 0x23c], eax
jle 0x4048f6
cmp dword [ebx + edi*4], 0
je 0x4048e9
push esi
push str.__alloweddir
push dword [ebx + edi*4]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4048e9
mov eax, dword [ebx + edi*4]
xor ecx, ecx
mov byte [ebp - 0x231], cl
lea esi, [eax + esi*2]
cmp word [esi], cx
je 0x4048e3
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
pop ecx
cmp eax, 0x104
jae 0x4048e3
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4048e3
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x4048e3
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.0040359e
pop ecx
pop ecx
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp - 0x220], eax
je 0x4048cd
mov ecx, 0x104
cmp dword [ebp - 0x220], ecx
jae 0x4048cd
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
push ecx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
test eax, eax
jne 0x4048cd
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
test eax, eax
je 0x4048cd
lea eax, [ebp - 0x218]
mov ecx, section..data
push eax
call fcn.00404a8c
mov byte [ebp - 0x231], 1
lea ecx, [ebp - 0x230]
mov dword [ebp - 4], 1
call fcn.0040359e
or dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x238]
inc edi
cmp edi, dword [ebp - 0x23c]
jl 0x4047e5
push ebx
call dword [sym.imp.kernel32.dll_LocalFree]
mov al, byte [ebp - 0x231]
call fcn.004054b6
ret

Function at 0x404b45
Capabilities:
Accept command line arguments

Disassembly:
push esi
push 1
call fcn.0040359e
pop ecx
push 2
call dword [sym.imp.kernel32.dll_SetErrorMode]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov esi, eax
call fcn.0040477f
test al, al
jne 0x404b74
xor eax, eax
inc eax
jmp 0x404b83
push esi
call fcn.00404986
pop ecx
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
pop esi
ret 0x10