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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x43f7e0]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x42a356
cmp byte [ebx], 0xa
jne 0x42a356
or byte [eax + edi + 0x28], 4
jmp 0x42a35b
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x42a459
mov al, byte [edx]
cmp al, 0x1a
je 0x42a43b
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x42a38a
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x42a3af
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x42a3b9
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x42a36c
jmp 0x42a459
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42a436
cmp dword [ebp - 0xc], 0
je 0x42a436
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x43f7e0]
test byte [eax + edi + 0x28], 0x48
je 0x42a410
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x42a3fb
mov byte [esi], dl
jmp 0x42a40c
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x43f7e0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x42a459
cmp byte [ebp - 1], 0xa
jne 0x42a41f
cmp esi, ebx
jne 0x42a41f
mov byte [esi], 0xa
jmp 0x42a458
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00422411
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x42a459
mov byte [esi], 0xd
jmp 0x42a458
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x43f7e0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x42a455
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x42a459
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42a462
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x43f7e0]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x42a4a5
cmp word [esi], dx
jne 0x42a4a5
or byte [edi + eax + 0x28], 4
jmp 0x42a4aa
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x42a5fd
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x42a5dd
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x42a4ec
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x42a522
cmp eax, edx
jae 0x42a52e
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x42a4c4
jmp 0x42a5fd
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42a5d9
cmp dword [ebp - 0x14], 0
je 0x42a5d9
mov eax, dword [ebx*4 + 0x43f7e0]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x42a5b1
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x42a57a
mov word [esi], cx
jmp 0x42a5ad
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x43f7e0]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x43f7e0]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x43f7e0]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x42a5fd
pop ebx
cmp word [ebp - 4], bx
jne 0x42a5c2
cmp esi, dword [ebp + 0xc]
jne 0x42a5c2
mov word [esi], bx
jmp 0x42a5fa
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00422411
add esp, 0x10
cmp word [ebp - 4], bx
je 0x42a5fd
push 0xd
jmp 0x42a5f6
mov ecx, dword [ebx*4 + 0x43f7e0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x42a5f4
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x42a5fd
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42d010
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42d03d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42d03d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401838
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x10]
push esi
mov esi, ecx
mov dword [esi + 0x24], eax
add eax, 0xbf58
push eax
lea ecx, [esi + 0x40]
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [ebp + 8]
lea ecx, [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push eax
mov dword [esi + 0x28], eax
mov dword [ebp + 0x10], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
movzx eax, byte [ebp - 9]
push eax
movzx eax, byte [ebp - 0xa]
push eax
movzx eax, byte [ebp - 0xb]
push eax
movzx eax, byte [ebp - 0xc]
push eax
lea eax, [esi + 0x30]
push str._d._d._d._d
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x18
xor eax, eax
mov dword [esi + 0x2c], 1
push eax
push eax
push eax
push eax
push esi
push 0x402a30
call sub.MFC42.DLL_AfxBeginThread
mov dword [esi + 0x34], eax
pop esi
leave
ret 0xc
Function at 0x402d9d
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 0xc], 0
push esi
push edi
mov edi, ecx
push dword [ebp + 8]
mov word [ebp - 0x10], 2
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 1
push 2
mov word [ebp - 0xe], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402dd5
push 0xfffffffffffffff5
jmp 0x402e11
lea eax, [ebp - 0x10]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x402df1
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xfffffffffffffff4
jmp 0x402e11
push 0x1e
push esi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x402e09
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push 0xfffffffffffffff3
jmp 0x402e11
mov dword [edi + 0xbf70], esi
push 1
pop eax
pop edi
pop esi
leave
ret 4
Function at 0x403e7f
Capabilities:
Create directory

Disassembly:
mov eax, 0x41603b
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x2a4
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
push 1
lea ecx, [ebp - 0x10]
pop esi
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 2
call fcn.0040bae0
xor ebx, ebx
push esi
push ebx
lea ecx, [ebp - 0x198]
push dword [ebp + 8]
mov byte [ebp - 4], 3
call fcn.0040bc50
lea ecx, [ebp - 0x198]
xor edi, edi
call fcn.0040bda0
test eax, eax
jle 0x404003
mov esi, 0x41e650
lea ecx, [ebp - 0x70]
call fcn.0040ccd0
lea eax, [ebp - 0x70]
push edi
push eax
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 4
call fcn.0040bdb0
push edi
lea ecx, [ebp - 0x198]
call fcn.0040c860
movzx eax, al
mov dword [ebp - 0x18], eax
cmp eax, ebx
lea eax, [ebp + 0xc]
push esi
push eax
je 0x403f65
lea eax, [ebp - 0x24]
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 5
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x403fcc
lea eax, [ebp - 0x14]
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 0x2b0]
push eax
push dword [ebp - 0x10]
call sub.MFC42.DLL_CFile::GetStatus_1
cmp eax, ebx
jne 0x403fcc
push 0xffff
lea ecx, [ebp - 0x198]
push dword [ebp + 0xc]
push edi
call fcn.0040c8b0
push dword [ebp - 0x18]
push dword [ebp - 0x3c]
push str._s__d
push ebx
push dword [ebp - 0x1c]
call fcn.00409f0c
add esp, 0x14
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 3
call fcn.0040cd70
lea ecx, [ebp - 0x198]
inc edi
call fcn.0040bda0
cmp edi, eax
jl 0x403ee2
push ebx
lea ecx, [ebp - 0x198]
call fcn.0040c1f0
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 2
call fcn.0040bba0
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x4043b6
Capabilities:
Create thread

Disassembly:
mov eax, 0x416120
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x1f4
push esi
push edi
mov esi, ecx
or dword [ebp - 0x18], 0xffffffff
xor edi, edi
push 0x168
lea eax, [ebp - 0x200]
push edi
push eax
mov dword [ebp - 4], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [esi + 0x24], edi
jle 0x4044c9
lea eax, [ebp + 8]
push ebx
push eax
lea ecx, [esi + 0x1ea0]
call sub.MFC42.DLL_CString::operator_1
xor ebx, ebx
cmp dword [esi + 0x24], edi
jle 0x404445
lea eax, [ebp - 0x98]
lea edi, [ebp - 0x200]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
mov dword [edi], esi
push eax
xor eax, eax
push eax
push edi
push 0x4042f1
push eax
push eax
mov dword [edi + 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x10]
add dword [ebp - 0x10], 4
inc ebx
add edi, 0xc
cmp ebx, dword [esi + 0x24]
mov dword [ecx], eax
jl 0x404417
xor edi, edi
mov eax, dword [esi + 0x24]
mov ebx, 0x3a98
push ebx
lea ecx, [ebp - 0x98]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ecx
push eax
mov dword [ebp - 0x1c], eax
call edi
cmp eax, dword [ebp - 0x1c]
jae 0x40447d
mov dword [ebp - 0x18], eax
lea eax, [esi + eax*4 + 0x1ea4]
push eax
lea ecx, [esi + 0x1f1c]
call sub.MFC42.DLL_CString::operator_1
and dword [ebp - 0x10], 0
cmp dword [esi + 0x24], 0
jle 0x4044b9
lea eax, [ebp - 0x1f8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x18], eax
je 0x4044aa
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov eax, dword [eax]
test eax, eax
je 0x4044aa
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
inc dword [ebp - 0x10]
add dword [ebp - 0x14], 0xc
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0x24]
jl 0x404490
push ebx
lea eax, [ebp - 0x98]
push 1
push eax
push dword [ebp - 0x1c]
call edi
pop ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4

Function at 0x404f6c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
lea eax, [ebp + 0xc]
push edi
push eax
push 1
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [ebp + 0x10]
mov esi, eax
and byte [edi], 0
test esi, esi
jne 0x404fd0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0x104
push eax
lea eax, [ebp - 0x104]
push eax
push esi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov esi, eax
test esi, esi
jne 0x404fd0
lea eax, [ebp - 0x104]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
leave
ret 0xc
Function at 0x4057ae
Capabilities:
Create directory

Disassembly:
mov eax, 0x4164d0
call sub.MSVCRT.dll__EH_prolog
push ecx
push ecx
push esi
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString_2
push dword [ebp + 0xc]
mov edi, 0x41e768
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 4
push dword [ebp + 8]
push edi
push eax
call sub.MFC42.DLL_CString::Format
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add esp, 0x10
push 0
push dword [ebp - 0x10]
call esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push dword [ebp - 0x10]
push edi
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
push 0
push dword [ebp - 0x14]
call esi
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 0xc

Function at 0x405866
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x230]
xor ebx, ebx
mov eax, dword [esi + 0x54]
push ecx
push eax
call sub.MFC42.DLL_CFile::GetStatus_1
mov edi, eax
mov eax, dword [esi + 0x58]
lea ecx, [ebp - 0x118]
push ecx
push eax
call sub.MFC42.DLL_CFile::GetStatus_1
test edi, edi
je 0x4058d4
test eax, eax
je 0x4058ba
push ecx
mov ecx, dword [ebp - 0x114]
mov eax, esp
mov dword [eax], ecx
lea ecx, [ebp - 0x22c]
call fcn.00402a68
test eax, eax
je 0x4058be
push 1
jmp 0x4058da
push ecx
mov ecx, dword [ebp - 0x114]
mov eax, esp
mov dword [eax], ecx
lea ecx, [ebp - 0x22c]
call fcn.00405f0b
test eax, eax
je 0x4058db
push 2
pop ebx
mov eax, ebx
dec eax
je 0x4058ed
dec eax
jne 0x4058fb
push 0
push dword [esi + 0x54]
push dword [esi + 0x58]
jmp 0x4058f5
push 0
push dword [esi + 0x58]
push dword [esi + 0x54]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406212
Capabilities:
Get file version info

Disassembly:
mov eax, 0x416867
call sub.MSVCRT.dll__EH_prolog
sub esp, 0xae4
push ebx
push esi
push edi
xor ebx, ebx
push 0x4206e0
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call fcn.00414e58
push 1
mov esi, 0x104
pop edi
lea eax, [ebp - 0x120]
push esi
push ebx
push eax
mov dword [ebp - 4], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x120]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x120]
push ebx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
lea ecx, [ebp - 0xaf0]
push ecx
push eax
lea eax, [ebp - 0x120]
push ebx
push eax
call sub.VERSION.dll_GetFileVersionInfoA
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xaf0]
push 0x41e650
push eax
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x4062bb
mov eax, dword [ebp - 0x18]
push dword [eax + 0xc]
push dword [eax + 8]
lea eax, [ebp - 0x10]
push str._08x_08x
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [ebp - 0x120]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
cmp eax, ebx
pop ecx
je 0x4062d3
mov byte [eax + 1], bl
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x120]
push eax
call sub.MFC42.DLL_CString::operator
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x14], edi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x4069d4
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4169b4
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x318
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call sub.MFC42.DLL_CString::CString_2
mov esi, 0x104
lea eax, [ebp - 0x220]
push esi
push ebx
push eax
mov dword [ebp - 4], ebx
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x11c]
push ebx
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x324]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0x24
lea eax, [ebp - 0x220]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, ebx
je 0x406ace
lea eax, [ebp - 0x11c]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, ebx
je 0x406ace
lea eax, [ebp - 0x324]
push esi
push eax
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
cmp eax, ebx
je 0x406ace
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x324]
push eax
call esi
pop ecx
cmp eax, ebx
pop ecx
jne 0x406ac7
push ebx
lea eax, [ebp - 0x18]
push 0x20
push eax
mov ecx, edi
call fcn.0040705e
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x406ace
push eax
lea eax, [ebp - 0x11c]
push eax
call esi
pop ecx
cmp eax, ebx
pop ecx
je 0x406ace
mov dword [ebp - 0x14], 1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x406b6f
Capabilities:
Create directory

Disassembly:
mov eax, 0x4169ff
call sub.MSVCRT.dll__EH_prolog
mov eax, 0x1f30
call fcn.004152c0
push esi
mov esi, ecx
lea ecx, [ebp - 0x1f3c]
call fcn.00404193
and dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebp - 0x1f3c]
mov byte [ebp - 4], 1
call fcn.004049a7
push str._soft_IwawAgnt.exe
lea eax, [ebp - 0x10]
push dword [esi + 0x158]
push str._s_s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
add esi, 0x148
lea eax, [ebp - 0x14]
push str.soft
push esi
push eax
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
push ecx
mov eax, esp
mov dword [ebp - 0x18], esp
push str.softIwawAgnt.exe
push esi
push eax
call sub.MFC42.DLL_operator_1
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x1f3c]
mov byte [ebp - 4], 1
call fcn.004046bc
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
mov esi, eax
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1f3c]
call fcn.00404221
mov ecx, dword [ebp - 0xc]
mov eax, esi
mov dword fs:[0], ecx
pop esi
leave
ret
Function at 0x40705e
Capabilities:
Get common file path

Disassembly:
mov eax, 0x416ab7
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x10c
and dword [ebp - 0x14], 0
push esi
push edi
mov edi, ecx
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_2
push 1
lea eax, [ebp - 0x118]
pop esi
push 0
mov dword [ebp - 4], esi
push dword [ebp + 0xc]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
cmp eax, esi
jne 0x4070ad
lea eax, [ebp - 0x118]
lea ecx, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::operator
jmp 0x4070c1
cmp dword [ebp + 0x10], esi
jne 0x4070c1
push esi
push str._SHAPI
push edi
call fcn.00407507
add esp, 0xc
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x14], esi
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 0xc
Function at 0x407335
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0
lea eax, [ebp - 0x108]
push 0x23
mov ebx, ecx
push eax
push 0
mov dword [ebp - 4], ebx
call edi
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x407395
push 0
lea eax, [ebp - 0x108]
push 0x1a
push eax
push 0
call edi
test eax, eax
jne 0x407395
lea eax, [ebp - 0x108]
push str.C:Program_Files
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push 0
push dword [ebx + 0x148]
call esi
lea eax, [ebp - 0x108]
lea edi, [ebx + 0x148]
push eax
push str._sgongfubb
push edi
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push 0
push dword [edi]
call esi
mov ebx, 0x41e650
mov ecx, edi
push ebx
call fcn.00414e40
mov eax, dword [ebp - 4]
lea edi, [eax + 0x14c]
lea eax, [ebp - 0x108]
push eax
push str._sgongfubak
push edi
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push 0
push dword [edi]
call esi
push ebx
mov ecx, edi
call fcn.00414e40
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4097f1
Capabilities:
Connect socket
Resolve dns

Disassembly:
mov eax, 0x4170d8
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
push str.connect_to__s
push ebx
push edi
call fcn.00409f0c
add esp, 0x10
lea eax, [ebp + 8]
lea ecx, [edi + 8]
push eax
call sub.MFC42.DLL_CString::operator_1
mov ax, word [ebp + 0xc]
cmp dword [edi + 4], ebx
mov word [edi + 0x20], ax
jbe 0x40983a
mov ecx, edi
call fcn.00409d79
mov eax, dword [ebp + 8]
movsx eax, byte [eax]
push eax
call dword [sym.imp.MSVCRT.dll_isalpha]
pop ecx
push dword [ebp + 8]
test eax, eax
je 0x409857
call dword [sym.imp.WS2_32.dll_gethostbyname]
jmp 0x40986e
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
push 2
lea eax, [ebp - 0x10]
push 4
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
mov esi, eax
cmp esi, ebx
je 0x4098f3
push 0x10
lea eax, [ebp - 0x20]
push ebx
push eax
call sub.MSVCRT.dll_memset
movsx eax, word [esi + 0xa]
push eax
mov eax, dword [esi + 0xc]
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
mov ax, word [esi + 8]
add esp, 0x18
mov word [ebp - 0x20], ax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
push ebx
push 1
push 2
mov word [ebp - 0x1e], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov eax, dword [ebp + 0x10]
cmp eax, ebx
mov dword [edi + 4], esi
je 0x4098c4
mov dword [eax], esi
lea eax, [ebp - 0x20]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4098f3
push dword [ebp + 8]
push str.cannot_connect_server__s
push 1
push edi
call fcn.00409f0c
add esp, 0x10
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 4], ebx
mov edi, dword [edi + 4]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc