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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x414c24]
push edi
jae 0x40c631
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x414c40]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40c631
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40c507
test dl, 2
jne 0x40c507
test dl, 0x48
je 0x40c4d1
cmp byte [eax + 5], 0xa
je 0x40c4d1
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c51a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40c502
mov dword [0x4138e4], ecx
jmp 0x40c638
cmp eax, 0x6d
jne 0x40c50e
xor eax, eax
jmp 0x40c645
push eax
call fcn.0040b395
pop ecx
jmp 0x40c642
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40c62c
test eax, eax
je 0x40c541
cmp byte [ebx], 0xa
jne 0x40c541
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40c54a
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40c626
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c616
cmp al, 0xd
je 0x40c57c
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40c608
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40c596
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40c591
add dword [ebp - 8], 2
jmp 0x40c5ea
mov dword [ebp - 8], eax
jmp 0x40c604
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c5be
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c604
cmp dword [ebp - 0x10], 0
je 0x40c604
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40c5df
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c5ea
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40c607
cmp ebx, dword [ebp + 0xc]
jne 0x40c5ef
cmp byte [ebp - 1], 0xa
jne 0x40c5ef
mov byte [ebx], 0xa
jmp 0x40c607
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040aeed
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40c608
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40c560
jmp 0x40c626
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40c626
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40c645
and dword [0x4138e4], 0
mov dword [0x4138e0], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40cd33
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x40cd4c
or eax, 0xffffffff
jmp 0x40cdad
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x40cda9
push 0x3d
push esi
call fcn.0040cf33
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x40cda9
cmp esi, eax
je 0x40cda9
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x41390c]
sete cl
cmp eax, dword [0x413910]
mov dword [ebp - 8], ecx
jne 0x40cd8f
mov edi, eax
call fcn.0040ccd2
mov dword [0x41390c], eax
cmp eax, ebx
jne 0x40cde8
cmp dword [ebp + 0xc], ebx
je 0x40cdb1
cmp dword [0x413914], ebx
je 0x40cdb1
call fcn.0040c855
test eax, eax
je 0x40cde8
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x40cdba
xor eax, eax
jmp 0x40cdac
push 4
call fcn.0040587f
cmp eax, ebx
pop ecx
mov dword [0x41390c], eax
je 0x40cda9
mov dword [eax], ebx
cmp dword [0x413914], ebx
jne 0x40cde8
push 4
call fcn.0040587f
cmp eax, ebx
pop ecx
mov dword [0x413914], eax
je 0x40cda9
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x41390c]
call fcn.0040cc85
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x40ce49
cmp dword [esi], ebx
je 0x40ce49
lea esi, [esi + edi*4]
push dword [esi]
call fcn.004057d5
cmp dword [ebp - 8], ebx
pop ecx
jne 0x40ce2c
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x40ce8a
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x40ce23
mov eax, edi
shl eax, 2
push eax
push dword [0x41390c]
call fcn.00407181
cmp eax, ebx
pop ecx
pop ecx
je 0x40ce8a
jmp 0x40ce85
cmp dword [ebp - 8], ebx
jne 0x40cef5
cmp edi, ebx
jge 0x40ce58
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x41390c]
call fcn.00407181
cmp eax, ebx
pop ecx
pop ecx
je 0x40cda9
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x41390c], eax
cmp dword [ebp + 0xc], ebx
je 0x40cedf
push dword [ebp - 4]
call fcn.0040a8f0
inc eax
inc eax
push eax
call fcn.0040587f
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x40cedf
push dword [ebp - 4]
push esi
call fcn.0040a6c0
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x40ced8
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.004057d5
pop ecx
cmp dword [ebp - 8], ebx
je 0x40ceed
push dword [ebp - 4]
call fcn.004057d5
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x40cdac
push dword [ebp - 4]
call fcn.004057d5
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x40cdb6
Function at 0x409e0c
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
call fcn.00403520
mov eax, dword [ebp - 0x18]
call fcn.00403520
mov eax, dword [ebp - 0x1c]
call fcn.00403520
xor eax, eax
push ebp
push 0x409f10
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
mov eax, dword [ebp - 0x14]
call fcn.00403530
push eax
mov eax, dword [ebp - 0x18]
call fcn.00403530
mov edx, eax
mov eax, dword [0x40c650]
pop ecx
call fcn.00409d94
pop ecx
test al, al
je 0x409ef5
mov eax, dword [ebp - 0x1c]
call fcn.004048ec
test al, al
je 0x409e86
mov eax, dword [ebp - 0x1c]
call fcn.00403530
push eax
call sub.kernel32.dll_DeleteFileA
xor eax, eax
push ebp
push 0x409eda
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x1c]
call fcn.00403530
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push ebx
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x409ee4
mov eax, dword [ebp - 0x10]
call fcn.00404520
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_FreeResource
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409f17
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00403140
ret

Function at 0x4017d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
test ecx, ecx
mov dword [ebp - 0xc], ebx
mov ebx, eax
mov dword [ebp - 8], esi
mov esi, edx
mov dword [ebp - 4], edi
mov edi, ecx
jne 0x4017f6
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x40188a
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x401845
cmp eax, 0x40
je 0x401845
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x4017e9
cmp eax, 0x40
je 0x4017e9
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
jmp 0x4017e9
mov dword [esp + 8], 0x34
mov dword [esp + 4], 0x404040
mov dword [esp], str.VirtualQuery__addr__b__sizeof_b__
call sym.__assert
lea esi, [esi]
lea edi, [edi]
Function at 0x401750
Capabilities:
Terminate process

Disassembly:
sub esp, 0x3f4
push ebx
push ebp
push 0x41703c
mov ebx, ecx
push str.update.dat
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x401796
push eax
push eax
push 0x417060
call sub.MFC42.DLL_AfxMessageBox_1
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop ebp
pop ebx
add esp, 0x3f4
ret
mov al, byte [ebp + 0xc]
push esi
test al, 0x10
push edi
jne 0x401879
mov ecx, 0x7d
xor eax, eax
lea edi, [esp + 0x10]
push ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push 0x1f4
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x401879
mov esi, 0x417038
lea eax, [esp + 0x10]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4017f9
test cl, cl
je 0x4017f5
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4017f9
add eax, 2
add esi, 2
test cl, cl
jne 0x4017d5
xor eax, eax
jmp 0x4017fe
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40186f
mov esi, 0x417034
lea eax, [esp + 0x10]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40182f
test cl, cl
je 0x40182b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40182f
add eax, 2
add esi, 2
test cl, cl
jne 0x40180b
xor eax, eax
jmp 0x401834
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40186f
lea eax, [esp + 0x204]
lea ecx, [esp + 0x10]
push eax
push 0x41705c
push ecx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov eax, dword [ebx + 0x220]
add esp, 0xc
lea ecx, [ebx + 0x218]
lea edx, [esp + 0x204]
push edx
push 1
push eax
call fcn.004029d0
test byte [ebp + 0xc], 0x10
je 0x4017a3
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov eax, dword [ebx + 0x21c]
add esp, 0xc
test eax, eax
jne 0x4018a0
xor esi, esi
jmp 0x4018ab
mov esi, dword [ebx + 0x220]
sub esi, eax
sar esi, 9
call dword [sym.imp.MSVCRT.dll_rand]
xor edx, edx
pop edi
div esi
pop esi
pop ebp
mov dword [ebx + 0x228], edx
pop ebx
add esp, 0x3f4
ret
Function at 0x402420
Capabilities:
Create directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40e461
push eax
mov dword fs:[0], esp
sub esp, 0x218
mov ecx, 0x41
xor eax, eax
push ebp
push esi
push edi
mov ebp, dword [esp + 0x234]
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
dec esi
test esi, esi
jle 0x402480
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
cmp byte [esi + ebp], 0x5c
jne 0x40247b
push esi
lea eax, [esp + 0x20]
push ebp
push eax
call edi
add esp, 0xc
dec esi
test esi, esi
jg 0x402469
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
test eax, eax
je 0x402610
lea edx, [esp + 0x1c]
push ebx
push edx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 0x14]
push 1
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x238], 0
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x4171a0
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x14]
test eax, eax
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4024f1
push 0x4171a0
lea ecx, [esp + 0x14]
call fcn.0040dc3c
push 0x5c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
push 0x5c
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], eax
call sub.MFC42.DLL_CString::Find_1
mov ecx, dword [esp + 0x10]
mov esi, eax
cmp byte [esi + ecx - 1], 0x3a
jne 0x402527
inc esi
lea ecx, [esp + 0x10]
push esi
push 0x5c
call sub.MFC42.DLL_CString::Find_2
mov esi, eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
cmp esi, 0xffffffff
mov byte [esp + 0x230], 1
je 0x4025ea
mov ebx, dword [sym.imp.MSVCRT.dll__access]
cmp esi, dword [esp + 0x14]
jg 0x4025ea
lea ebp, [esi + 1]
lea edx, [esp + 0x1c]
push ebp
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x234], 2
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x230], 1
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x124]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x128]
push ecx
call ebx
add esp, 8
cmp eax, 0xffffffff
jne 0x4025d3
lea edx, [esp + 0x124]
push edx
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
push ebp
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find_2
mov esi, eax
cmp esi, 0xffffffff
jne 0x402547
lea ecx, [esp + 0x18]
mov byte [esp + 0x230], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x230], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop ebx
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x224
ret 4
Function at 0x403080
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
mov eax, dword [esp + 0x194]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
lea ecx, [esp + 8]
push ecx
push 0x202
mov dword [esi], 0x40f5b8
mov dword [esi + 4], eax
mov dword [esi + 8], 0xffffffff
mov byte [esi + 0x960], bl
mov dword [esi + 0x968], ebx
call sub.WSOCK32.dll_WSAStartup
mov dword [esi + 0x96c], ebx
mov dword [esi + 0x964], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x190
ret 4

Function at 0x4032b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x40e4a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 8]
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString_2
lea edi, [esi + 0x10]
lea eax, [esp + 0x10]
push edi
push 0x41705c
push eax
mov byte [esp + 0x30], 2
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x14]
lea edx, [esp + 8]
lea eax, [esp + 0xc]
push ecx
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push ecx
push edx
mov dword [esp + 0x28], 0x50
call sub.MFC42.DLL_AfxParseURL
test eax, eax
setne al
test al, al
jne 0x403396
push edi
push str.ParseURL____s
push str.CHttpSocket
push 0x14
call fcn.00407ec0
add esp, 0x10
lea ecx, [esp + 8]
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push eax
lea ecx, [esi + 0x410]
push 0x41705c
push ecx
call edi
mov edx, dword [esp + 0x14]
add esp, 0xc
lea eax, [esi + 0x452]
push edx
push 0x41705c
push eax
call edi
mov cx, word [esp + 0x20]
add esp, 0xc
mov word [esi + 0x450], cx
lea ecx, [esp + 8]
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
pop edi
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x20
ret
Function at 0x403420
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
push 0
push 1
mov esi, ecx
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x403453
push str.Socket__
push str.CHttpSocket
push 0x14
call fcn.00407ec0
add esp, 0xc
mov eax, 2
pop esi
pop ecx
ret
lea ecx, [esp + 4]
push 4
push ecx
push 4
push 0xffff
push eax
mov dword [esp + 0x18], 1
call sub.WSOCK32.dll_setsockopt
test eax, eax
jge 0x40347a
push str.Socket_SO_REUSEADDR_
jmp 0x403497
mov ecx, dword [esi + 8]
lea eax, [esp + 4]
push 4
push eax
push 1
push 6
push ecx
call sub.WSOCK32.dll_setsockopt
test eax, eax
jge 0x4034be
push str.Socket_TCP_NODELAY_
push str.CHttpSocket
push 0x14
call fcn.00407ec0
mov edx, dword [esi + 8]
add esp, 0xc
push edx
call sub.WSOCK32.dll_closesocket
mov dword [esi + 8], 0xffffffff
mov eax, 2
pop esi
pop ecx
ret
xor eax, eax
pop esi
pop ecx
ret
Function at 0x403b90
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov ecx, 0x100
lea ebx, [ebp + 0x55c]
xor eax, eax
mov edi, ebx
mov byte [esp + 0x13], al
rep stosd dword es:[edi], eax
xor esi, esi
cmp esi, 0x400
jge 0x403c1e
mov ecx, dword [ebp + 8]
push 0
lea eax, [esp + 0x17]
push 1
push eax
push ecx
call sub.WSOCK32.dll_recv
test eax, eax
jle 0x403c03
mov dl, byte [esp + 0x13]
mov byte [ebx + esi], dl
inc esi
cmp esi, 4
jl 0x403bae
cmp byte [esi + ebp + 0x558], 0xd
jne 0x403bae
cmp byte [esi + ebp + 0x559], 0xa
jne 0x403bae
cmp byte [esi + ebp + 0x55a], 0xd
jne 0x403bae
cmp byte [esi + ebp + 0x55b], 0xa
je 0x403c4d
jmp 0x403bae
push eax
push str.RecvHttpHeadRes:recv_error_len__d
push str.CHttpSocket
push 0x14
call fcn.00407ec0
mov eax, dword [ebp + 8]
add esp, 0x10
push eax
jmp 0x403c36
push str.RecvHttpHeadRes:bEndRecv__false_error
push str.CHttpSocket
push 0x14
call fcn.00407ec0
mov ecx, dword [ebp + 8]
add esp, 0xc
push ecx
call sub.WSOCK32.dll_closesocket
pop edi
mov dword [ebp + 8], 0xffffffff
pop esi
pop ebp
mov eax, 5
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x403c60
Capabilities:
Create directory
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40e4cb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x52c
push ebx
mov ebx, ecx
push ebp
push esi
lea esi, [ebx + 0x55c]
push edi
or ebp, 0xffffffff
push esi
lea ecx, [esp + 0x14]
mov dword [ebx + 0x95c], ebp
call sub.MFC42.DLL_CString::CString_1
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
push str.200_OK
push esi
mov dword [esp + 0x54c], 0
call edi
add esp, 8
test eax, eax
jne 0x403dc2
push str.206_Partial_Content
push esi
call edi
add esp, 8
test eax, eax
jne 0x403dc2
push str.GetHttpFileSize___
push str.CHttpSocket
push 0x14
call fcn.00407ec0
push str.errorlog
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 0x10
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x186a0
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
idiv ecx
push edx
lea edx, [esp + 0x3c]
push str.errorlog_errorHead__d.dat
push edx
call edi
lea eax, [esp + 0x44]
push 0x41744c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x403d82
add ebx, 0x452
lea ecx, [esp + 0x13c]
push ebx
push str.GetFiled_HttpHeadResError:ReqFile__s__n
push ecx
call edi
lea edi, [esp + 0x148]
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
repne scasb al, byte es:[edi]
not ecx
push ebp
dec ecx
push 1
lea edx, [esp + 0x150]
push ecx
push edx
call ebx
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
push ecx
push esi
call ebx
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x30
push str.302_Found
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
mov dword [esp + 0x544], 0xffffffff
test eax, eax
lea ecx, [esp + 0x10]
je 0x403db3
call sub.MFC42.DLL_CString::CString
mov eax, 9
jmp 0x403e87
call sub.MFC42.DLL_CString::CString
mov eax, 6
jmp 0x403e87
push 0
push str.Content_Length
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find
mov edx, eax
cmp edx, ebp
je 0x403e4e
mov edi, str.Content_Length
mov ecx, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [edx + ecx + 2]
lea ecx, [esp + 0x10]
push esi
push 0x417038
call sub.MFC42.DLL_CString::Find
sub eax, esi
lea ecx, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push esi
push eax
call sub.MFC42.DLL_CString::Mid
mov edi, dword [esp + 0x14]
mov ecx, ebp
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [ebx + 0x95c], eax
call sub.MFC42.DLL_CString::CString
jmp 0x403e62
push 0x4173e4
push str.CHttpSocket
push 0x14
call fcn.00407ec0
add esp, 0xc
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x403e75
mov eax, dword [ebx + 0x95c]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x10]
mov dword [esp + 0x544], ebp
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x53c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x538
ret
Function at 0x403ea0
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
sub esp, 0x200
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x95c]
test eax, eax
je 0x403fb4
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
xor ebp, ebp
cmp byte [esi + 0x960], 1
je 0x403f59
mov ecx, dword [esi + 8]
push 0
lea eax, [esp + 0x14]
push 0x200
push eax
push ecx
call sub.WSOCK32.dll_recv
mov edi, eax
test edi, edi
jl 0x403f80
je 0x403fb4
mov ecx, dword [esi + 0x964]
mov eax, dword [esi + 4]
add ebp, edi
add ecx, edi
test eax, eax
mov dword [esi + 0x964], ecx
je 0x403f35
mov eax, dword [esi + 0xc]
test eax, eax
je 0x403f20
push eax
push 1
lea edx, [esp + 0x18]
push edi
push edx
call ebx
add esp, 0x10
mov edx, dword [esi + 0x95c]
mov ecx, dword [esi + 4]
push edx
push ebp
mov eax, dword [ecx]
lea edx, [esp + 0x18]
push edi
push edx
call dword [eax]
mov eax, dword [esi + 0x95c]
cmp ebp, eax
jl 0x403f43
test eax, eax
jg 0x403fb4
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [esi + 0x968], eax
jmp 0x403ec2
mov eax, dword [esi + 8]
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 8], 0xffffffff
mov byte [esi + 0x960], 0
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x200
ret
push str.RecvHttpFile___recv
push str.CHttpSocket
push 0x14
call fcn.00407ec0
mov ecx, dword [esi + 8]
add esp, 0xc
push ecx
call sub.WSOCK32.dll_closesocket
mov dword [esi + 8], 0xffffffff
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x200
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200
ret