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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004a4da2
and dword [ebp - 4], 0
cmp dword [0x50159c], 0
mov ebx, eax
jne 0x4a9b92
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4a9c43
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4b665c
push edi
call esi
test eax, eax
je 0x4a9c43
push eax
call fcn.004a4d33
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x50159c], eax
call esi
push eax
call fcn.004a4d33
mov dword [esp], 0x4b6638
push edi
mov dword [0x5015a0], eax
call esi
push eax
call fcn.004a4d33
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x5015a4], eax
call esi
push eax
call fcn.004a4d33
pop ecx
mov dword [0x5015ac], eax
test eax, eax
je 0x4a9b92
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004a4d33
pop ecx
mov dword [0x5015a8], eax
mov eax, dword [0x5015a8]
cmp eax, ebx
je 0x4a9bea
cmp dword [0x5015ac], ebx
je 0x4a9bea
push eax
call fcn.004a4dab
push dword [0x5015ac]
mov esi, eax
call fcn.004a4dab
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4a9bea
test edi, edi
je 0x4a9bea
call esi
test eax, eax
je 0x4a9be1
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4a9be1
test byte [ebp - 0xc], 1
jne 0x4a9bea
or dword [ebp + 0x10], 0x200000
jmp 0x4a9c23
mov eax, dword [0x5015a0]
cmp eax, ebx
je 0x4a9c23
push eax
call fcn.004a4dab
pop ecx
test eax, eax
je 0x4a9c23
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4a9c23
mov eax, dword [0x5015a4]
cmp eax, ebx
je 0x4a9c23
push eax
call fcn.004a4dab
pop ecx
test eax, eax
je 0x4a9c23
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x50159c]
call fcn.004a4dab
pop ecx
test eax, eax
je 0x4a9c43
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4a9c45
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4ac02e
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
xor ebx, ebx
push 1
push ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call fcn.004a9435
mov dword [ebp - 0x18], eax
and eax, edx
add esp, 0x10
mov dword [ebp - 0x14], edx
cmp eax, 0xffffffff
je 0x4ac0b4
push 2
push ebx
push ebx
push dword [ebp + 8]
call fcn.004a9435
mov ecx, eax
and ecx, edx
add esp, 0x10
cmp ecx, 0xffffffff
je 0x4ac0b4
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
sub esi, eax
sbb edi, edx
js 0x4ac149
jg 0x4ac08d
cmp esi, ebx
jbe 0x4ac149
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4ac0c0
call fcn.004a207a
mov dword [eax], 0xc
call fcn.004a207a
mov eax, dword [eax]
pop edi
pop esi
pop ebx
leave
ret
push 0x8000
push dword [ebp + 8]
call fcn.004ac1e2
pop ecx
pop ecx
mov dword [ebp - 8], eax
test edi, edi
jl 0x4ac0e0
jg 0x4ac0dc
cmp esi, ebx
jb 0x4ac0e0
mov eax, ebx
jmp 0x4ac0e2
mov eax, esi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.004a6e70
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ac12c
cdq
sub esi, eax
sbb edi, edx
js 0x4ac103
jg 0x4ac0d2
test esi, esi
ja 0x4ac0d2
mov esi, dword [ebp - 0x10]
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.004ac1e2
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
jmp 0x4ac1b2
call fcn.004a208d
cmp dword [eax], 5
jne 0x4ac141
call fcn.004a207a
mov dword [eax], 0xd
or esi, 0xffffffff
mov dword [ebp - 0xc], esi
jmp 0x4ac106
cmp edi, ebx
jg 0x4ac1be
jl 0x4ac153
cmp esi, ebx
jae 0x4ac1be
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004a9435
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x4ac0b4
push dword [ebp + 8]
call fcn.004a0883
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
neg eax
sbb eax, eax
neg eax
dec eax
cdq
mov dword [ebp - 0x10], eax
and eax, edx
mov dword [ebp - 0xc], edx
cmp eax, 0xffffffff
jne 0x4ac1be
call fcn.004a207a
mov dword [eax], 0xd
call fcn.004a208d
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov esi, dword [ebp - 0x10]
and esi, dword [ebp - 0xc]
cmp esi, 0xffffffff
je 0x4ac0b4
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.004a9435
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x4ac0b4
xor eax, eax
jmp 0x4ac0bb
Function at 0x4ac458
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x98]
sub esp, 0x118
mov eax, dword [0x4c0390]
xor eax, ebp
mov dword [ebp + 0x94], eax
mov eax, dword [ebp + 0xa0]
or dword [ebp - 0x7c], 0xffffffff
push ebx
xor ebx, ebx
push esi
lea esi, [ebp - 0x74]
mov dword [ebp - 0x80], ebx
cmp eax, ebx
jne 0x4ac4b2
call fcn.004a208d
mov dword [eax], ebx
call fcn.004a207a
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.004a3b25
add esp, 0x14
or eax, 0xffffffff
jmp 0x4ac564
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x4ac547
lea eax, [ebp - 0x74]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, eax
cmp edi, 0x104
jle 0x4ac505
lea ebx, [edi + 1]
push 1
push ebx
call fcn.004a6a7a
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4ac545
mov dword [ebp - 0x80], 1
test edi, edi
je 0x4ac545
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x4ac547
mov al, byte [esi]
cmp al, 0x5c
je 0x4ac513
cmp al, 0x2f
jne 0x4ac518
cmp al, byte [esi + 1]
je 0x4ac540
mov byte [ebp - 0x78], 0x3d
movzx eax, byte [esi]
push eax
call fcn.004ac8a4
pop ecx
mov byte [ebp - 0x77], al
push esi
lea eax, [ebp - 0x78]
push eax
mov byte [ebp - 0x76], 0x3a
mov byte [ebp - 0x75], 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x4ac547
mov dword [ebp - 0x7c], ebx
jmp 0x4ac554
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a20a0
pop ecx
pop edi
cmp dword [ebp - 0x80], ebx
je 0x4ac561
push esi
call fcn.0049dbfd
pop ecx
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp + 0x94]
pop esi
xor ecx, ebp
pop ebx
call fcn.0049dea6
add ebp, 0x98
leave
ret

Function at 0x547485
Capabilities:
Get number of processors

Disassembly:
add edi, ebp
pop edx
lea ecx, [edx]
mov al, 0xd
ret
setns cl
sub eax, dword [esp + 0x30]
lea ecx, [esp + 1]
sbb edx, dword [ecx + 0x2b]
idiv esi
sub eax, 0x1e3cc
sub eax, 0x986b96
sbb eax, eax
push 0xfffffffffffffff4
imul edx, eax, 0xcfa924b3
sbb byte [ebp + 0x36], dh
dec esi
pop edi
lea edi, [edi - 0x6811]
or eax, esi
push dword [ebp - 0x6a]
jmp 0x54724c
push 0x2a68f44a
dec edi
call fcn.005471b5
push esi
mov edx, dword fs:[0x30]
test edx, edx
js 0x5474d3
and al, 0xff
cmp ch, ah
mov edx, dword [edx + 0xc]
push ebx
inc eax
mov ebx, dword [edx + 0x1c]
mov ebx, dword [ebx + 8]
push 1
cmp ecx, 0xc660992b
push 0xfaf33646
call fcn.005471b5
xchg bh, bl
mov edx, esp
push 4
push edx
push 0x15
push 0xffffffffffffffff
mov bl, 0x64
call fcn.005471b1
add esp, 4
pop ebx
pop edi
call edi
xchg ch, dl
call fcn.005473c6
xchg cl, ch
cmp dword [ebp - 0x145], 0x133
jle 0x547389
sub esi, dword [esp + 0x28]
jbe 0x547389
jmp 0x54735d
Function at 0x4010c3
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 8]
mov esi, eax
mov eax, dword [ebp + 0x18]
and dword [esi], 0
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x40113b
cmp word [ebx + 8], 2
jne 0x401118
cmp word [ebx + 0xa], 4
jne 0x401118
mov edi, dword [ebx + 0xc]
jmp 0x401112
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00401060
test eax, eax
mov dword [esi], eax
je 0x401136
lea esi, [eax + 0x1c]
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x4010f6
mov esi, dword [ebp + 0x18]
push 0x400
push dword [ebx]
push esi
call fcn.0040ddc0
add esp, 0xc
mov byte [esi + 0x400], 0
xor eax, eax
jmp 0x401161
push 8
pop eax
jmp 0x401161
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x401161
dec ecx
je 0x40115c
dec ecx
je 0x401155
dec ecx
jmp 0x401161
mov eax, 0x2afb
jmp 0x401161
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x14

Function at 0x40170f
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
cmp dword [0x426140], 0
mov eax, dword [0x4240b8]
mov dword [ebp + 0x1ac], eax
mov dword [ebp - 0x80], str.getaddrinfo
mov dword [ebp - 0x7c], 0x4012ea
mov dword [ebp - 0x78], str.getnameinfo
mov dword [ebp - 0x74], 0x401564
mov dword [ebp - 0x70], str.freeaddrinfo
mov dword [ebp - 0x6c], fcn.004012b1
jne 0x401864
push 0x104
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40185a
push ebx
push esi
push edi
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push eax
call fcn.0040dc50
lea eax, [ebp + 0xa0]
push str.ws2_32
push eax
call fcn.0040dc60
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x10
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4017d1
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x4017cd
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
jne 0x40181d
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push eax
call fcn.0040dc50
lea eax, [ebp + 0xa0]
push str.wship6
push eax
call fcn.0040dc60
add esp, 0x10
lea eax, [ebp + 0xa0]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401857
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x401819
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x401857
xor ebx, ebx
push dword [ebp + ebx*8 - 0x80]
push esi
call edi
test eax, eax
mov dword [ebp + ebx*8 - 0x7c], eax
je 0x401836
inc ebx
cmp ebx, 3
jl 0x40181f
jmp 0x40183f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x401857
xor eax, eax
mov ecx, dword [ebp + eax - 0x7c]
mov dword [eax + 0x424d20], ecx
add eax, 8
cmp eax, 0x18
jl 0x401845
pop edi
pop esi
pop ebx
mov dword [0x426140], 1
movzx eax, word [ebp + 0x1b8]
mov ecx, dword [ebp + 0x1ac]
mov eax, dword [eax*8 + 0x424d20]
call fcn.00410727
add ebp, 0x1b0
leave
ret 4
Function at 0x4022ec
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x1b4]
sub esp, 0x234
mov eax, dword [0x4240b8]
and dword [ebp - 0x7c], 0
push edi
mov dword [ebp + 0x1b0], eax
xor eax, eax
mov ecx, 0x8a
lea edi, [ebp - 0x78]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0
push 2
mov edi, eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
cmp eax, 0xffffffff
mov dword [ebp - 0x80], eax
je 0x40238a
lea ecx, [ebp - 0x7c]
push ecx
push eax
mov dword [ebp - 0x7c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x40238a
push esi
cmp dword [ebp - 0x74], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x402362
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x80]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x402345
jmp 0x402384
push dword [ebp - 0x64]
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x402381
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
call esi
push dword [ebp - 0x80]
call esi
pop esi
mov ecx, dword [ebp + 0x1b0]
pop edi
call fcn.00410727
add ebp, 0x1b4
leave
ret

Function at 0x40255d
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov esi, eax
push 3
xor edx, edx
lea eax, [esi + 2]
pop edi
div edi
shl eax, 2
cmp dword [ebp + 8], 0
je 0x402616
cmp dword [ebp + 0xc], eax
jae 0x402587
xor eax, eax
jmp 0x402616
mov eax, dword [ebp + 8]
push ebx
lea ebx, [ecx + esi]
jmp 0x4025ee
movzx esi, byte [ecx]
mov edi, esi
shr esi, 2
mov dl, byte [esi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ccccccccccccccccccccccccccccccccccccccccccc_ccc_456789:__ccccccc]
and edi, 3
shl edi, 4
mov byte [eax], dl
inc eax
inc ecx
cmp ecx, ebx
jae 0x4025f4
movzx edx, byte [ecx]
mov esi, edx
and edx, 0xf
shr esi, 4
shl edx, 2
or esi, edi
mov dword [ebp + 0xc], edx
mov dl, byte [esi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ccccccccccccccccccccccccccccccccccccccccccc_ccc_456789:__ccccccc]
mov byte [eax], dl
inc eax
inc ecx
cmp ecx, ebx
jae 0x402602
movzx esi, byte [ecx]
mov edi, esi
shr edi, 6
or edi, dword [ebp + 0xc]
and esi, 0x3f
mov dl, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ccccccccccccccccccccccccccccccccccccccccccc_ccc_456789:__ccccccc]
mov byte [eax], dl
mov dl, byte [esi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ccccccccccccccccccccccccccccccccccccccccccc_ccc_456789:__ccccccc]
inc eax
mov byte [eax], dl
inc eax
inc ecx
cmp ecx, ebx
jb 0x402590
jmp 0x402612
mov cl, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ccccccccccccccccccccccccccccccccccccccccccc_ccc_456789:__ccccccc]
mov byte [eax], cl
inc eax
mov byte [eax], 0x3d
jmp 0x40260d
mov ecx, dword [ebp + 0xc]
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ccccccccccccccccccccccccccccccccccccccccccc_ccc_456789:__ccccccc]
mov byte [eax], cl
inc eax
mov byte [eax], 0x3d
inc eax
sub eax, dword [ebp + 8]
pop ebx
pop edi
pop esi
pop ebp
ret 8
Function at 0x402c36
Capabilities:
Resume thread

Disassembly:
push esi
push edi
mov esi, eax
call fcn.00402c11
mov edi, eax
test edi, edi
jne 0x402c75
mov eax, dword [esp + 0xc]
and dword [esi + 8], edi
mov dword [esi + 4], eax
lea eax, [esi + 0x10]
push eax
push 4
push esi
push 0x402b55
push edi
push edi
call fcn.0040ecea
mov edi, eax
add esp, 0x18
test edi, edi
je 0x402c75
push edi
mov dword [esi + 0xc], edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, edi
pop edi
pop esi
ret 4

Function at 0x40329b
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, eax
test esi, esi
mov eax, dword [ecx]
jbe 0x4032c0
push ebx
push edi
movzx ebx, byte [edx]
mov edi, eax
shl eax, 8
shr edi, 0x18
or eax, ebx
xor eax, dword [edi*4 + 0x41ce78]
inc edx
dec esi
jne 0x4032a6
pop edi
pop ebx
mov dword [ecx], eax
pop esi
ret

Function at 0x403313
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor esi, esi
mov edi, ecx
cmp edi, esi
mov dword [eax + 0x14], esi
je 0x403374
cmp word [edi], si
je 0x403374
push eax
push edi
call fcn.0040ef7c
test eax, eax
pop ecx
pop ecx
jne 0x403374
push esi
push 0x8000000
push 3
push esi
push 3
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0xc], ebx
je 0x403374
mov edi, 0x1000
push edi
call fcn.0040ee1c
cmp eax, esi
pop ecx
mov dword [ebp - 4], eax
jne 0x40337d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov ecx, dword [ebp + 8]
push esi
mov dword [ecx], esi
lea ecx, [ebp - 8]
push ecx
push edi
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x4033b0
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x4033b6
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + 8]
call fcn.0040329b
push esi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 4]
push dword [ebp - 0xc]
call ebx
test eax, eax
jne 0x403392
push dword [ebp - 4]
call fcn.0040dd48
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
call fcn.004032c4
jmp 0x403376
Function at 0x403a72
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x41a716
call fcn.00410f20
sub esp, 0x5c
mov eax, dword [0x4240b8]
push esi
push str.CDownloadFile::ContinueDownload_begin.__n
mov dword [ebp - 0x10], eax
call fcn.00409adb
lea ecx, [ebp - 0x68]
lea esi, [ebx + 0x38]
mov eax, dword [esi]
push ecx
push eax
call fcn.0040ef7c
add esp, 0xc
test eax, eax
je 0x403aaf
xor eax, eax
jmp 0x403c2b
mov eax, dword [esi]
push edi
mov edi, dword [eax - 0xc]
push 0x5c
call fcn.0040456b
mov ecx, edi
sub ecx, eax
lea eax, [ebp - 0x38]
push eax
dec ecx
mov eax, esi
call fcn.00404589
xor edi, edi
mov dword [ebp - 4], edi
push dword [ebx + 0x40]
push str.CDownloadFile::ContinueDownload_m_nThreadNumber_d.__n
call fcn.00409adb
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
pop ecx
pop ecx
push dword [ebx + 0x48]
push edi
push str.ThreadNumber
push dword [ebp - 0x38]
call esi
cmp dword [ebx + 0x40], eax
jne 0x403c1d
push dword [ebx + 0x48]
push edi
push str.DownloadSize
push dword [ebp - 0x38]
call esi
mov dword [ebp - 0x40], eax
mov eax, dword [ebx + 0x40]
shl eax, 3
push eax
call fcn.0040d90a
and dword [ebp - 0x3c], 0
cmp dword [ebx + 0x40], 0
mov edi, eax
mov eax, dword [ebp - 0x40]
pop ecx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x34], eax
jle 0x403b97
push dword [ebp - 0x3c]
lea eax, [ebp - 0x30]
push str.Thread_dEnd
push eax
call fcn.0040f32f
add esp, 0xc
push dword [ebx + 0x48]
lea eax, [ebp - 0x30]
push 0
push eax
push dword [ebp - 0x38]
call esi
mov ecx, dword [ebp - 0x3c]
push ecx
mov dword [edi + ecx*8], eax
lea eax, [ebp - 0x30]
push 0x41de84
push eax
call fcn.0040f32f
add esp, 0xc
push dword [ebx + 0x48]
lea eax, [ebp - 0x30]
push 0
push eax
push dword [ebp - 0x38]
call esi
mov ecx, dword [ebp - 0x3c]
mov edx, dword [edi + ecx*8]
mov dword [edi + ecx*8 + 4], eax
sub edx, eax
mov eax, dword [ebp - 0x34]
inc ecx
cmp ecx, dword [ebx + 0x40]
lea eax, [eax + edx + 1]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], ecx
jl 0x403b30
push dword [ebp - 0x34]
push str.CDownloadFile::ContinueDownload_lTmp_d.__n
call fcn.00409adb
mov eax, dword [ebx + 0x30]
cmp dword [ebp - 0x34], eax
pop ecx
pop ecx
je 0x403bb8
push edi
call fcn.0040f39e
xor edi, edi
jmp 0x403c1c
mov ecx, dword [ebp - 0x40]
mov dword [ebx + 0x3c], ecx
cmp dword [ebx + 0x3c], eax
jge 0x403c07
and dword [ebp - 0x34], 0
cmp dword [ebx + 0x40], 0
jle 0x403c07
push 0x44
call fcn.0040d90f
test eax, eax
pop ecx
je 0x403bf2
mov ecx, dword [ebp - 0x34]
shl ecx, 3
push dword [ecx + edi]
mov edi, dword [ecx + edi + 4]
mov esi, eax
call fcn.00405603
mov edi, dword [ebp - 0x44]
jmp 0x403bf4
xor eax, eax
push ebx
mov esi, eax
call fcn.00402df2
inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebx + 0x40]
jl 0x403bcd
push edi
call fcn.0040f39e
mov dword [esp], str.CDownloadFile::ContinueDownload_OK.__n
call fcn.00409adb
xor edi, edi
inc edi
pop ecx
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
call fcn.0040252d
mov eax, edi
pop edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
call fcn.00410727
leave
ret
Function at 0x404bbd
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x404bd4
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
jne 0x404be6
xor eax, eax
jmp 0x404c17
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x404c09
cmp edi, eax
jae 0x404be2
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x404bfb
cmp edi, eax
jae 0x404be2
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret

Function at 0x404c6e
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
mov eax, 0x41a412
call fcn.00410f20
sub esp, 0x210
mov eax, dword [0x4240b8]
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x21c], ebx
lea eax, [ebp - 0x218]
je 0x404cbd
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
push eax
push dword [ebp + 8]
call fcn.004043b4
mov eax, dword [ebp + 8]
jmp 0x404dbd
push esi
push edi
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.0040f2ff
pop ecx
pop ecx
mov edi, eax
push str.acctdata_
lea eax, [edi + 2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ebx
lea eax, [ebp - 0x218]
push eax
call esi
push str.update_
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
call edi
lea eax, [ebp - 0x218]
push eax
push str.GetDownloadPath_:_s_n
call fcn.00409adb
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.004043b4
push str.write.test
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 4], ebx
call edi
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x10000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x404da0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.00404846
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.0040252d
mov eax, esi
jmp 0x404dbb
push 0x41da74
push dword [ebp + 8]
call fcn.004043b4
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.0040252d
mov eax, dword [ebp + 8]
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.00410727
leave
ret
Function at 0x40564d
Capabilities:
Terminate thread

Disassembly:
and dword [esi + 0x10], 0
mov eax, esi
mov dword [esi], 0x41e28c
call fcn.00405680
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [esi], 0x41e298
mov eax, esi
jmp fcn.00402cbb

Function at 0x405694
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [esi + 0x38]
sub ebx, dword [esi + 0x3c]
push ebx
push str.CDownloadThread::DivideTask_nLen_ld_n
call fcn.00409adb
pop ecx
cmp ebx, 0x10000
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
pop ecx
jg 0x4056e1
call ebx
sub eax, dword [esi + 0x40]
cmp eax, 0x2710
jge 0x4056da
xor esi, esi
jmp 0x405704
mov eax, esi
call fcn.00405680
mov eax, dword [esi + 0x38]
mov dword [edi + 0x38], eax
mov eax, dword [esi + 0x38]
add eax, dword [esi + 0x3c]
cdq
sub eax, edx
sar eax, 1
mov dword [edi + 0x34], eax
mov dword [edi + 0x3c], eax
dec eax
mov dword [esi + 0x38], eax
call ebx
mov dword [esi + 0x40], eax
xor esi, esi
inc esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop esi
pop ebx
leave
ret