joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000a3c0
Capabilities:
Delete file
Get common file path
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x10049390]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x41c], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.10022790
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.10022790
add esp, 0x18
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x20c]
push eax
push 0
push 0x1003fbd0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp dword [esi + 0x14], 8
jb 0x1000a44e
mov esi, dword [esi]
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
push esi
push 0
call dword [0x1004ef30]
test eax, eax
jns 0x1000a479
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10020459
mov esp, ebp
pop ebp
ret 8
push ebx
push edi
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
xor bl, bl
cmp edi, 0xffffffff
je 0x1000a50f
push 0x1000
call fcn.1001f9a0
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 4
mov esi, eax
lea eax, [ebp - 0x418]
push 0
push eax
push 0x1000
push esi
push edi
call ebx
test eax, eax
je 0x1000a4fd
mov edi, edi
mov eax, dword [ebp - 0x418]
test eax, eax
je 0x1000a4fd
mov ecx, dword [ebp - 0x41c]
push eax
push esi
call fcn.10005460
push 0
lea eax, [ebp - 0x418]
push eax
push 0x1000
push esi
push edi
call ebx
test eax, eax
jne 0x1000a4d0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.10020c2c
add esp, 4
mov bl, 1
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.10020459
mov esp, ebp
pop ebp
ret 8
Function at 0x10013900
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, edx
cmp ecx, ebx
je 0x100139c7
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [ecx + 0x10]
lea eax, [esi - 0xc]
push eax
lea ecx, [edi + 4]
call fcn.1000eb90
push esi
lea ecx, [edi + 0x10]
call fcn.1000eb90
lea eax, [esi + 0xc]
push eax
lea ecx, [edi + 0x1c]
call fcn.1000eb90
lea eax, [esi + 0x18]
push eax
lea ecx, [edi + 0x28]
call fcn.1000eb90
lea eax, [esi + 0x24]
lea ecx, [edi + 0x34]
cmp ecx, eax
je 0x10013957
push 0xffffffffffffffff
push 0
push eax
call fcn.100029e0
lea eax, [esi + 0x3c]
lea ecx, [edi + 0x4c]
cmp ecx, eax
je 0x1001396b
push 0xffffffffffffffff
push 0
push eax
call fcn.100029e0
lea eax, [esi + 0x54]
lea ecx, [edi + 0x64]
cmp ecx, eax
je 0x1001397f
push 0xffffffffffffffff
push 0
push eax
call fcn.100029e0
mov eax, dword [esi + 0x6c]
mov dword [edi + 0x7c], eax
mov eax, dword [esi + 0x70]
mov dword [edi + 0x80], eax
mov eax, dword [esi + 0x74]
mov dword [edi + 0x84], eax
mov al, byte [esi + 0x78]
mov byte [edi + 0x88], al
mov ecx, dword [esi + 0x7c]
add esi, 0x90
mov dword [edi + 0x8c], ecx
add edi, 0x90
lea ecx, [esi - 0x10]
cmp ecx, ebx
jne 0x10013916
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 8]
pop ebx
pop ebp
ret
Function at 0x1001e040
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x18]
mov eax, dword [ecx]
cmp eax, edx
je 0x1001e062
cmp word [eax + 0x24], 0x18
je 0x1001e062
mov eax, dword [eax]
cmp eax, edx
jne 0x1001e055
push esi
mov esi, dword [eax + 0x10]
push 0xb1866570
push esi
call fcn.1001e0a0
push 0x3fc1bd8d
push esi
mov dword [0x1004dde0], eax
call fcn.1001e0a0
add esp, 0x10
mov dword [0x1004ddec], eax
mov byte [0x1004dddc], 1
pop esi
ret

Function at 0x1001e0a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003872b
mov eax, dword fs:[0]
push eax
sub esp, 0x134
mov eax, dword [0x10049390]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x1001e13e
mov eax, dword [edi + 0x3c]
xor esi, esi
mov edx, dword [eax + edi + 0x78]
mov eax, dword [eax + edi + 0x7c]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x130], edx
mov eax, dword [edi + edx + 0x1c]
mov ecx, dword [edi + edx + 0x20]
add eax, edi
mov ebx, dword [edi + edx + 0x18]
add ecx, edi
mov dword [ebp - 0x140], eax
mov eax, dword [edi + edx + 0x24]
add eax, edi
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 0x138], eax
test ebx, ebx
je 0x1001e13e
lea ebx, [ebx]
mov eax, dword [ecx + esi*4]
add eax, edi
push eax
call fcn.1001f660
add esp, 4
cmp eax, dword [ebp + 0xc]
je 0x1001e15c
mov ecx, dword [ebp - 0x13c]
inc esi
cmp esi, ebx
jb 0x1001e120
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10020459
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x140]
movzx eax, word [eax + esi*2]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x130]
lea esi, [ecx + edi]
cmp eax, ecx
ja 0x1001e24f
add eax, dword [ebp - 0x134]
cmp ecx, eax
jae 0x1001e24f
push 0x2e
push esi
call fcn.10021ab0
add esp, 8
test eax, eax
je 0x1001e13e
lea edi, [eax + 1]
sub eax, esi
push eax
push esi
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.10021bdb
push 4
push 4
lea eax, [ebp - 0x12c]
push str.N_N
push eax
call fcn.10002090
add esp, 0x20
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 0x10
jb 0x1001e1dc
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.10021a48
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x118], 0x10
jb 0x1001e20f
push dword [ebp - 0x12c]
call fcn.10020454
add esp, 4
push edi
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
call fcn.1001f660
add esp, 4
push eax
lea eax, [ebp - 0x114]
push eax
call dword [0x1004dde0]
push eax
call fcn.1001e0a0
add esp, 8
jmp 0x1001e140
mov eax, esi
jmp 0x1001e140
Function at 0x1001f660
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
or eax, 0xffffffff
mov cl, byte [edx]
test cl, cl
je 0x1001f709
movzx ecx, cl
lea edx, [edx + 1]
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov cl, byte [edx]
test cl, cl
jne 0x1001f673
not eax
pop ebp
ret
Function at 0x4f65b4
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov eax, dword fs:[0x124]
dec dword [eax + 0xd4]
mov ebx, dword [ebp + 8]
push 1
push dword [ebx + 0x30]
call fcn.00432e7a
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov ecx, dword [ebx + 0x14]
mov dword [eax + 4], ecx
mov ecx, dword [ebx + 0x18]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 0x1c]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebx + 0x40]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebx + 0x44]
mov dword [eax + 0x14], ecx
lea edi, [eax + 0x18]
mov esi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x30]
call fcn.004323ce
mov eax, dword fs:[0x124]
inc dword [eax + 0xd4]
pop edi
pop esi
pop ebx
jne 0x4f6630
lea ecx, [eax + 0x34]
cmp dword [ecx], ecx
je 0x4f6630
mov cl, 1
mov byte [eax + 0x49], 1
call dword [fcn.0040110c]
pop ebp
ret 8
Function at 0x4fcf20
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov ecx, dword [ebp + 0x18]
mov eax, dword [0x47b1d0]
lea edx, [eax + ecx + 0x1f]
dec eax
not eax
push edi
mov edi, dword [ebp + 8]
and edx, eax
mov eax, dword [edi + 0x108]
lea ecx, [eax - 0x48]
cmp edx, ecx
mov dword [ebp + 0x18], edx
jbe 0x4fcf53
xor eax, eax
jmp 0x4fd031
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebx + 0x30]
mov ecx, eax
sub ecx, esi
cmp edx, ecx
jbe 0x4fcfbc
cmp esi, eax
jae 0x4fcf7e
mov edx, ecx
shr ecx, 2
or eax, 0xffffffff
lea edi, [esi + ebx]
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 8]
xor eax, eax
push eax
lea esi, [edi + 0xe0]
push esi
push dword [edi + 0x108]
lea ecx, [ebp - 8]
push ebx
push ecx
push eax
push eax
push eax
push dword [ebp + 0xc]
call 0x3fdea4
mov dword [ebx + 0x30], 0x48
mov ecx, dword [edi + 0x108]
add dword [esi], ecx
adc dword [esi + 4], 0
test eax, eax
jge 0x4fcfb9
xor eax, eax
jmp 0x4fd02f
mov edx, dword [ebp + 0x18]
mov esi, dword [ebx + 0x30]
mov eax, dword [ebp + 0x14]
shl eax, 0x10
add esi, ebx
add eax, edx
mov dword [esi + 4], eax
mov dword [esi], 0xc0010001
mov eax, dword fs:[0x124]
mov dword [ebp + 8], eax
call dword [edi + 0x128]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x14], edx
mov ecx, dword [eax + 0x1f0]
mov dword [esi + 8], ecx
mov ecx, dword [eax + 0x1ec]
mov dword [esi + 0xc], ecx
mov ecx, dword [eax + 0x144]
mov dword [esi + 0x18], ecx
mov eax, dword [eax + 0x148]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0x18]
mov word [esi + 4], ax
add dword [ebx + 0x30], eax
mov ecx, dword [edi + 0x108]
mov eax, dword [ebx + 0x30]
sub ecx, 4
cmp eax, ecx
ja 0x4fd02c
or dword [eax + ebx], 0xffffffff
lea eax, [esi + 0x20]
pop esi
pop ebx
pop edi
leave
ret 0x18
Function at 0x50a692
Capabilities:
Access peb ldr_data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x6274624f
push 0x44
push 1
call fcn.00448568
mov esi, eax
test esi, esi
je 0x50a761
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x50a6d3
push 0x44
push ebx
call fcn.00427ab6
test eax, eax
jge 0x50a6d3
push 0
push esi
call fcn.00447ee0
xor eax, eax
jmp 0x50a760
push edi
push 0x11
pop ecx
push 0x1000
xor eax, eax
mov edi, esi
push ebx
rep stosd dword es:[edi], eax
call fcn.0050a544
test eax, eax
jne 0x50a703
push eax
push esi
call fcn.00447ee0
test ebx, ebx
je 0x50a6ff
push 0x44
push ebx
call fcn.004276e2
xor eax, eax
jmp 0x50a75f
push 4
pop edx
lea ecx, [eax + 4]
mov dword [esi], eax
mov edi, edx
mov ebx, ecx
mov dword [ebx], edi
add edi, edx
add ebx, 8
cmp edi, 0x804
jb 0x50a70f
mov dword [ecx], 0xfffffffe
xor ecx, ecx
mov dword [eax + 0xffc], ecx
mov eax, dword [ebp + 8]
mov dword [esi + 0x30], edx
mov dword [esi + 0x38], 0x800
mov dword [esi + 4], eax
mov eax, dword fs:[0x124]
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x84]
mov dword [esi + 8], eax
xor eax, eax
mov dword [esi + 0x40], ecx
lea edi, [esi + 0xc]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [esi + 0x24], ecx
mov eax, esi
pop edi
pop ebx
pop esi
pop ebp
ret 4

Function at 0x51781e
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
test ecx, ecx
push esi
je 0x517877
cmp ecx, 0xffffffff
je 0x517877
mov edx, dword [eax + 0x10]
cmp edx, 0x40
jb 0x517877
cmp word [ecx], 0x5a4d
jne 0x517877
mov eax, dword [ecx + 0x3c]
push edi
xor esi, esi
lea edi, [eax + 4]
inc esi
cmp edx, edi
pop edi
jb 0x517877
add eax, ecx
cmp dword [eax], 0x4550
jne 0x51785f
push 3
jmp 0x517868
cmp word [eax], 0x454e
jne 0x517869
push 2
pop esi
mov eax, dword [ebp + 8]
test eax, eax
je 0x517872
mov dword [eax], esi
xor eax, eax
inc eax
jmp 0x517879
xor eax, eax
pop esi
pop ebp
ret 8
Function at 0x2c9f058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x2c9f1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x2c9f07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x2c9f06a
add dl, dl
jne 0x2c9f089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x2c9f0dc
xor eax, eax
add dl, dl
jne 0x2c9f096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x2c9f17d
add dl, dl
jne 0x2c9f0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x2c9f0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x2c9f0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x2c9f0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x2c9f0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x2c9f075
mov eax, 1
add dl, dl
jne 0x2c9f0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x2c9f0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x2c9f0e1
sub eax, ebx
mov ebx, 1
jne 0x2c9f128
mov ecx, 1
add dl, dl
jne 0x2c9f10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x2c9f119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x2c9f105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x2c9f075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x2c9f13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x2c9f14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x2c9f136
cmp eax, 0x7d00
jae 0x2c9f16d
cmp eax, 0x500
jb 0x2c9f168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x2c9f075
cmp eax, 0x7f
ja 0x2c9f170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x2c9f075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x2c9f19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x2c9f075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x40108b
Capabilities:
Check if file exists

Disassembly:
push ebp
lea ebp, [esp - 0x394]
sub esp, 0x414
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp + 0x390], eax
push esi
xor esi, esi
push 0x40e
lea eax, [ebp - 0x7e]
push esi
push eax
mov word [ebp - 0x80], si
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x4072dc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, esi
jne 0x40118e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
push 0x104
lea eax, [ebp - 0x80]
push eax
push esi
call ebx
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, 0x4072a8
je 0x401126
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push edi
lea eax, [ebp - 0x80]
push 0x208
push eax
call dword [sym.imp.MSVCR80.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
call esi
test eax, eax
jne 0x40118c
push 0x410
lea eax, [ebp - 0x80]
push 0
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x80]
push eax
push 0x400000
call ebx
test eax, eax
je 0x401189
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.MSVCR80.dll_wcslen]
test eax, eax
pop ecx
je 0x401189
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push edi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401189
lea eax, [ebp - 0x80]
push eax
call esi
test eax, eax
jne 0x40118c
push edi
call esi
pop edi
pop ebx
mov ecx, dword [ebp + 0x390]
xor ecx, ebp
pop esi
call fcn.004058fe
add ebp, 0x394
leave
ret
Function at 0x40163d
Capabilities:
Create tcp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x406b85
mov eax, dword fs:[0]
push eax
sub esp, 0x1c8
mov eax, dword [0x40a020]
xor eax, esp
mov dword [esp + 0x1c0], eax
push ebx
push esi
push edi
mov eax, dword [0x40a020]
xor eax, esp
push eax
lea eax, [esp + 0x1d8]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x10]
or dword [esp + 0x1c4], 0xffffffff
lea eax, [esp + 0x34]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4016af
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x1c4], eax
xor ebx, ebx
mov dword [esp + 0x1e0], ebx
lea esi, [esp + 0x20]
mov dword [esp + 0x1c], 0x407b10
call fcn.004017e2
lea esi, [esp + 0x24]
mov byte [esp + 0x1e0], 1
call fcn.00402a67
cmp edi, ebx
mov byte [esp + 0x1e0], 2
mov byte [esp + 0x30], bl
je 0x4016f6
lea eax, [esp + 0x1c]
push eax
mov ecx, edi
call fcn.004021ee
mov edx, 0x4075b0
lea eax, [esp + 0x1c]
mov byte [esp + 0x1e0], 3
call fcn.004025ab
test al, al
je 0x401738
push 0x4075c0
lea esi, [esp + 0x18]
call fcn.0040140a
mov byte [esp + 0x1e0], 4
cmp dword [esp + 0x14], ebx
jne 0x401775
call fcn.0040146e
call fcn.00401361
jmp 0x401775
mov edx, 0x407620
lea eax, [esp + 0x1c]
call fcn.004025ab
test al, al
je 0x401785
push 0x407630
lea esi, [esp + 0x18]
call fcn.0040140a
mov byte [esp + 0x1e0], 5
cmp dword [esp + 0x14], ebx
jne 0x401775
call fcn.0040146e
call fcn.004011ee
call fcn.004012d5
cmp dword [esp + 0x18], ebx
je 0x401785
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1e0], bl
call fcn.004021ac
cmp dword [esp + 0x1c4], 0xffffffff
je 0x4017b4
push dword [esp + 0x1c4]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [esp + 0x1c4], 0xffffffff
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov ecx, dword [esp + 0x1d8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c0]
xor ecx, esp
call fcn.004058fe
mov esp, ebp
pop ebp
ret 0x10

Function at 0x401ead
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 0x401ec4
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x401ef9
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x401ef5
cmp edi, eax
jae 0x401ef9
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x401ee7
cmp edi, eax
jb 0x401efd
xor eax, eax
jmp 0x401f07
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x402ef0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebx]
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ecx
je 0x402f7f
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 4]
push edx
push ecx
lea edx, [ebp - 8]
push edx
push ecx
push dword [ebp + 8]
push eax
call edi
cmp dword [ebp - 8], 1
je 0x402f27
cmp dword [ebp - 8], 2
jne 0x402f7e
push esi
mov esi, dword [ebp + 0xc]
call fcn.00401d7d
mov eax, dword [ebp - 4]
shr eax, 1
inc eax
push eax
call fcn.004019ee
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
push dword [ebx]
call edi
test eax, eax
jne 0x402f7d
mov eax, dword [ebp - 4]
shr eax, 1
and word [esi + eax*2], 0
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x402f6f
push eax
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
mov edx, esi
call fcn.00401ad5
mov dword [ebp - 0xc], 1
pop esi
pop edi
mov eax, dword [ebp - 0xc]
leave
ret 8

Function at 0x4034cc
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push 8
mov eax, 0x406a70
call fcn.0040622c
mov eax, dword [0x40a254]
mov ecx, 0x40a254
xor ebx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], ebx
call fcn.00403097
lea edi, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.0040184f
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.0040200f
push 0x407c54
mov eax, edi
push eax
call fcn.004019ca
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403541
push esi
push ebx
push 0x407c6c
push 0x40769c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ebx, eax
lea eax, [esi - 0x10]
call fcn.0040200f
mov eax, ebx
call fcn.004062cb
ret

Function at 0x403551
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push 8
mov eax, 0x406a70
call fcn.0040622c
mov eax, dword [0x40a254]
mov ecx, 0x40a254
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
and dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.00403097
lea edi, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.0040184f
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.0040200f
push 0x407c78
mov eax, edi
push eax
call fcn.004019ca
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4035cb
push esi
push 0
push 0x407ca0
push 0x407cb0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
lea eax, [esi - 0x10]
call fcn.0040200f
call fcn.004062cb
ret 4
Function at 0x403674
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40370c
push edi
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp - 4], ebx
mov edi, eax
jne 0x403702
cmp edi, 0x200000
ja 0x403702
lea eax, [edi + 2]
push esi
push eax
call fcn.004058a2
pop ecx
push ebx
mov esi, eax
lea eax, [ebp + 8]
push eax
push edi
push esi
push dword [ebp - 8]
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403701
mov eax, dword [ebp + 8]
cmp eax, edi
jne 0x403701
mov byte [eax + esi], bl
mov eax, dword [ebp + 8]
mov byte [eax + esi + 1], bl
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
mov dword [ebp - 0xc], 1
pop esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, dword [ebp - 0xc]
pop ebx
leave
ret 0xc

Function at 0x4049d3
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x120
mov eax, dword [0x40a020]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
push edi
mov esi, 0x11c
push esi
xor edi, edi
lea eax, [ebp - 0xa8]
push edi
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa8], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push eax
call esi
cmp eax, edi
jne 0x404a36
lea eax, [ebp - 0xa8]
push eax
mov dword [ebp - 0xa8], 0x114
call esi
cmp eax, edi
je 0x404b03
mov eax, dword [ebp - 0x98]
dec eax
je 0x404aef
dec eax
jne 0x404b03
cmp dword [ebp - 0xa4], 6
jne 0x404ab2
mov eax, dword [ebp - 0xa0]
cmp eax, 4
jne 0x404a65
push 0xf
jmp 0x404aec
cmp eax, 3
jne 0x404a78
xor eax, eax
cmp byte [ebp + 0x72], 1
setne al
add eax, 0xd
jmp 0x404aae
cmp eax, 2
jne 0x404a8b
xor eax, eax
cmp byte [ebp + 0x72], 1
setne al
add eax, 0xb
jmp 0x404aae
cmp eax, 1
jne 0x404a9e
xor eax, eax
cmp byte [ebp + 0x72], 1
setne al
add eax, 9
jmp 0x404aae
cmp eax, edi
jne 0x404b03
xor eax, eax
cmp byte [ebp + 0x72], 1
setne al
add eax, 7
mov edi, eax
jmp 0x404b03
cmp dword [ebp - 0xa4], 5
jne 0x404ae1
cmp dword [ebp - 0xa0], 2
jne 0x404ac8
push 5
jmp 0x404aec
cmp dword [ebp - 0xa0], 1
jne 0x404ad5
push 6
jmp 0x404aec
cmp dword [ebp - 0xa0], edi
jne 0x404b03
push 3
jmp 0x404aec
cmp dword [ebp - 0xa4], 4
ja 0x404b03
push 4
pop edi
jmp 0x404b03
mov eax, dword [ebp - 0x9c]
and eax, 0xffff0000
cmp eax, 0x45a0000
sbb edi, edi
inc edi
inc edi
mov ecx, dword [ebp + 0x74]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004058fe
add ebp, 0x78
leave
ret