joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403160
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x403260
cmp word [ecx], 0x886a
jne 0x403260
mov eax, dword [ecx + 0x12c]
cmp eax, 1
je 0x403194
test eax, eax
je 0x403194
mov eax, 1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
push eax
push ecx
call fcn.00402c10
add esp, 8
test eax, eax
jne 0x403251
mov al, byte [ebp - 0x20]
test al, al
je 0x403251
call fcn.00403270
push eax
lea ecx, [ebp - 0x20]
push ecx
call fcn.00416610
add esp, 8
test eax, eax
jne 0x4031d3
mov eax, 1
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x20]
push edx
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x40325a
or ecx, 0xffffffff
push esi
push edi
mov edi, dword [eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edx, [ebp - 0x60]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [0x4331e0]
and ecx, 3
test al, al
rep movsb byte es:[edi], byte [esi]
jne 0x40323a
call fcn.00403270
push eax
call sub.WSOCK32.dll_gethostbyname
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
shr ecx, 2
mov edi, 0x4331e0
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x60]
push eax
push 0x4331e0
call fcn.00416610
add esp, 8
test eax, eax
pop edi
pop esi
jne 0x40325a
mov eax, 1
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret

Function at 0x40a6c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 1
push esi
call fcn.0040ba90
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
add esp, 8
push 1
call edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push ebx
mov esi, eax
call edi
cmp esi, 0xffffffff
jne 0x40a6f8
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov eax, esi
and al, 0x10
xor cl, cl
cmp cl, al
pop edi
pop esi
pop ebx
sbb eax, eax
neg eax
pop ebp
ret

Function at 0x40a710
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
push 1
push 0
push ecx
push edx
mov dword [ebp - 4], 4
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40a73d
xor eax, eax
mov esp, ebp
pop ebp
ret
push esi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ebp + 8]
push edx
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp + 0xc]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
je 0x40a771
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 4
je 0x40a77d
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40a789
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x40a7a0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
lea eax, [ebp + 0xc]
push eax
push 0
push 2
push 0
push 0x432f2c
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40a7cc
xor eax, eax
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push esi
push 4
lea eax, [ebp + 0x14]
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
pop ebp
ret

Function at 0x40a800
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x18]
lea eax, [ebp + 0x18]
push eax
push 1
push 0
push ecx
push edx
mov byte [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40a829
xor eax, eax
pop esi
pop ebp
ret
mov edx, dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x18]
push esi
lea ecx, [ebp + 0xc]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40a852
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x40a852
cmp eax, 2
jbe 0x40a855
mov byte [esi], 0
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov cl, byte [esi]
xor eax, eax
test cl, cl
setne al
pop esi
pop ebp
ret

Function at 0x40a870
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
lea eax, [ebp + 0xc]
push eax
push 0
push 2
push 0
push 0x432f2c
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40a89c
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
push esi
push eax
mov eax, dword [ebp + 0xc]
push ecx
push 1
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp + 0xc]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
pop ebp
ret

Function at 0x40bd60
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x452398]
test eax, eax
je 0x40bd77
mov ecx, dword [ebp + 8]
push ecx
call eax
add esp, 4
pop ebp
ret
mov edx, dword [ebp + 8]
push edx
call fcn.00415d7b
Function at 0x40c100
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x452424]
test eax, eax
jne 0x40c122
push 4
push 0x34
push 0
call fcn.00409e50
add esp, 0xc
mov dword [0x452424], eax
push ebx
push esi
push edi
push 1
push 0x452424
call fcn.0040a0a0
mov eax, dword [0x452428]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
mov eax, dword [0x452424]
mov cl, byte [ebp + 8]
mov byte [eax + edx*4], cl
mov eax, dword [0x452428]
lea edx, [eax + eax*2]
lea eax, [eax + edx*4]
mov edx, dword [0x452424]
mov dword [edx + eax*4 + 0x30], 0
movsx eax, cl
push eax
lea ecx, [ebp - 4]
push 0x42e9b4
push ecx
call fcn.00415cfc
mov eax, dword [0x452428]
mov ecx, dword [0x452424]
add esp, 0x14
push 0x20
lea edx, [eax + eax*2]
lea eax, [eax + edx*4]
lea edx, [ecx + eax*4 + 0x10]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov eax, dword [0x452428]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
mov eax, dword [0x452424]
lea edi, [eax + edx*4]
mov esi, 0x42f424
lea eax, [edi + 0x10]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40c1e8
test cl, cl
je 0x40c1e4
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40c1e8
add eax, 2
add esi, 2
test cl, cl
jne 0x40c1c0
xor eax, eax
jmp 0x40c1ed
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
test eax, eax
sete cl
mov esi, 0x42f424
mov dword [edi + 8], ecx
mov eax, dword [0x452428]
mov ecx, dword [0x452424]
lea edx, [eax + eax*2]
lea eax, [eax + edx*4]
lea edx, [ecx + eax*4]
lea edi, [edx + 0x10]
mov eax, edi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40c239
test cl, cl
je 0x40c235
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40c239
add eax, 2
add esi, 2
test cl, cl
jne 0x40c215
xor eax, eax
jmp 0x40c23e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40c27a
mov esi, 0x42f420
mov eax, edi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40c26d
test cl, cl
je 0x40c269
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40c26d
add eax, 2
add esi, 2
test cl, cl
jne 0x40c249
xor eax, eax
jmp 0x40c272
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40c27a
xor eax, eax
jmp 0x40c27f
mov eax, 1
mov dword [edx + 0xc], eax
mov ecx, dword [0x452428]
pop edi
mov eax, ecx
inc ecx
pop esi
mov dword [0x452428], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40c310
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
movsx edi, byte [ebp + 8]
push edi
call fcn.0040c0a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40c32c
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x40c352
push edi
lea eax, [ebp + 8]
push 0x42e9b4
push eax
call fcn.00415cfc
add esp, 0xc
lea ecx, [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [esi + 0x30], eax
mov ecx, dword [esi + 0x30]
xor eax, eax
cmp ecx, 4
pop edi
sete al
pop esi
pop ebp
ret
Function at 0x40c540
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov ecx, dword [ebp + 8]
push ebx
mov bl, byte [ecx]
test bl, bl
push esi
lea eax, [ebp - 0x104]
mov byte [ebp - 0x104], bl
lea edx, [ecx + 1]
je 0x40c584
mov cl, byte [edx]
inc eax
inc edx
test cl, cl
mov byte [eax], cl
jne 0x40c563
lea ecx, [ebp - 0x104]
cmp eax, ecx
je 0x40c584
mov cl, byte [eax - 1]
cmp cl, 0x2f
je 0x40c588
cmp cl, 0x5c
je 0x40c588
mov byte [eax], 0x5c
inc eax
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x40c5bf
mov cl, byte [edx]
inc edx
test cl, cl
mov byte [eax], cl
je 0x40c5a2
mov cl, byte [edx]
inc eax
inc edx
test cl, cl
mov byte [eax], cl
jne 0x40c598
mov cl, byte [0x42f408]
test cl, cl
mov byte [eax], cl
mov edx, 0x42f409
je 0x40c5da
mov cl, byte [edx]
inc eax
inc edx
test cl, cl
mov byte [eax], cl
jne 0x40c5b3
jmp 0x40c5da
mov cl, byte [0x42f434]
test cl, cl
mov byte [eax], cl
mov edx, 0x42f435
je 0x40c5da
mov cl, byte [edx]
inc eax
inc edx
test cl, cl
mov byte [eax], cl
jne 0x40c5d0
lea edx, [ebp - 0x244]
push edx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c64a
mov ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
push edi
lea ecx, [ebp - 0x244]
push ebx
push ecx
call fcn.0040c650
add esp, 0xc
lea edx, [ebp - 0x244]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40c642
push edi
lea eax, [ebp - 0x244]
push ebx
push eax
call fcn.0040c650
add esp, 0xc
lea ecx, [ebp - 0x244]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40c61f
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c720
Capabilities:
Enumerate network shares

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x401c
call fcn.004164a0
mov edx, dword [ebp + 8]
push ebx
push edi
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
lea eax, [ebp - 0x14]
not ecx
push eax
dec ecx
push edx
mov dword [ebp - 0x1c], 0x10
mov dword [ebp - 0x10], 0x4000
mov ebx, ecx
call fcn.0040c3a0
add esp, 8
test eax, eax
jne 0x40c837
push esi
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x401c]
push edx
lea eax, [ebp - 8]
push eax
push ecx
mov dword [ebp - 0x10], 0x4000
mov dword [ebp - 8], 0xffffffff
call sub.MPR.dll_WNetEnumResourceA
test eax, eax
jne 0x40c822
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
test eax, eax
jbe 0x40c764
lea edx, [ebp - 0x4008]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov esi, dword [eax]
test esi, esi
je 0x40c806
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, ebx
jbe 0x40c806
mov ecx, dword [ebp + 8]
push ebx
push ecx
push esi
call fcn.00416390
add esp, 0xc
test eax, eax
jne 0x40c806
mov cl, byte [esi + ebx]
cmp cl, 0x5c
lea eax, [esi + ebx]
jne 0x40c7dc
inc eax
push eax
call fcn.00411390
lea edx, [ebp - 0x18]
push edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
push 1
push eax
call fcn.0040a010
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
push ecx
push 1
push edx
call fcn.0040a010
add esp, 0x1c
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
inc eax
add edx, 0x20
cmp eax, ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
jb 0x40c7a5
jmp 0x40c764
cmp eax, 0x103
jne 0x40c764
mov eax, dword [ebp - 0x14]
push eax
call sub.MPR.dll_WNetCloseEnum
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40e400
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
push edi
je 0x40e42a
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x208]
push eax
push 0x3e
push edi
call fcn.00405f20
add esp, 0xc
jmp 0x40e43d
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x208]
push ecx
push edi
call fcn.00405930
add esp, 8
test eax, eax
je 0x40e44a
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40e467
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40e52e
cmp eax, 1
jne 0x40e487
push edi
call fcn.0040e6d0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40e52e
push edi
call fcn.00403010
add esp, 4
cmp eax, 0xfffffffb
je 0x40e4ac
test bl, 1
je 0x40e4ac
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
neg esi
lea eax, [ebp - 0x104]
sbb esi, esi
push eax
add esi, 7
push esi
push edi
call fcn.00405f20
add esp, 0xc
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 4
jne 0x40e512
mov edx, dword [ebp - 0x104]
push edx
call fcn.0040c2a0
add esp, 4
test eax, eax
jne 0x40e4fc
lea eax, [ebp - 0x104]
push eax
call fcn.0040e540
add esp, 4
test eax, eax
jne 0x40e52e
lea ecx, [ebp - 0x104]
push ecx
call fcn.0040e300
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x208]
push edx
call fcn.0040e580
add esp, 4
neg eax
pop edi
sbb eax, eax
pop esi
neg eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40ea10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push ebx
or ecx, 0xffffffff
push edi
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jl 0x40ea3c
cmp byte [ecx + edx - 1], 0x5c
jne 0x40ea3c
cmp byte [ecx + edx - 2], 0x3a
je 0x40ea3c
mov byte [ecx + edx - 1], 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40ea53
pop edi
mov eax, 7
pop ebx
pop ebp
ret
push esi
mov esi, dword [ebp + 0x10]
mov edi, ebx
and edi, 0x10
mov dword [esi], 0x124
je 0x40ea6a
mov dword [esi], 0x4124
test bl, 1
jne 0x40ea75
or dword [esi], 0x92
mov eax, dword [ebp + 8]
push eax
call fcn.0040e6d0
add esp, 4
test eax, eax
je 0x40ea88
or dword [esi], 0x49
test edi, edi
jne 0x40ea97
test bl, 4
jne 0x40ea97
or dword [esi], 0x8000
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret

Function at 0x40ed60
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
test byte [ebp + 0xc], 0x92
jne 0x40ed7e
mov eax, dword [ebp + 8]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
dec eax
neg eax
sbb eax, eax
neg eax
pop ebp
ret
mov ecx, dword [ebp + 8]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
dec eax
neg eax
sbb eax, eax
neg eax
pop ebp
ret
Function at 0x40edf0
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x26c
push esi
mov esi, dword [ebp + 0xc]
push edi
push esi
call fcn.00416377
mov edi, dword [ebp + 0x10]
push edi
call fcn.00416377
add esp, 8
push 1
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
cmp eax, 1
je 0x40ee32
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42f5d4
jmp 0x40ef22
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x168]
push edx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
push 0
mov dword [ebp - 0xc], 0x104
mov dword [ebp + 0xc], 0x20
call esi
cmp eax, 1
je 0x40ee78
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42f5b4
jmp 0x40ef22
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x26c]
push ecx
push edi
push 0
mov dword [ebp - 0x10], 0x104
mov dword [ebp - 8], 0x20
call esi
cmp eax, 1
je 0x40eeb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42f5b4
jmp 0x40ef22
push 0
lea edx, [ebp - 0x168]
push edx
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
cmp eax, 1
je 0x40eedb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42f58c
jmp 0x40ef22
push 0
lea ecx, [ebp - 0x26c]
push ecx
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
cmp eax, 1
je 0x40ef01
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42f564
jmp 0x40ef22
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
push 3
push ecx
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
cmp eax, 1
je 0x40ef3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42f548
push 0x42f53c
call fcn.004082f0
add esp, 0xc
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40f250
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40f284
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DB_
push 0x42b640
call fcn.004082f0
add esp, 0xc
mov eax, 1
pop esi
pop ebp
ret
test al, 2
je 0x40f28d
xor eax, eax
pop esi
pop ebp
ret
or eax, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
neg eax
sbb eax, eax
inc eax
pop esi
pop ebp
ret

Function at 0x4121f0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
mov edi, eax
call fcn.00404570
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
ret
Function at 0x412220
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
mov edi, eax
call fcn.00404570
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x412a00
Capabilities:
Allocate thread local storage

Disassembly:
mov eax, dword [0x454e60]
push esi
push eax
push 0x38
call fcn.00414030
mov esi, eax
add esp, 8
test esi, esi
je 0x412a8d
push edi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea edi, [esi + 0xc]
push 4
mov ecx, edi
mov dword [esi + 8], eax
call fcn.00415010
mov dword [edi], 0x4272ac
lea edi, [esi + 0x20]
push 4
mov ecx, edi
call fcn.00415010
mov dword [edi], 0x427298
mov ecx, dword [0x454e60]
push ecx
push 0x18
call fcn.00414030
mov edi, eax
add esp, 8
test edi, edi
je 0x412a65
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x412a67
xor edi, edi
push edi
mov dword [esi + 0x34], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x34]
mov dword [esi], 0
push edx
mov dword [esi + 4], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x412fe0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 8]
test eax, eax
je 0x413019
mov eax, dword [esi + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x413001
pop esi
pop ebp
ret
mov esi, dword [esi + 4]
mov ecx, dword [eax + 0x10]
cmp ecx, esi
ja 0x413010
xor eax, eax
pop esi
pop ebp
ret
mov ecx, dword [eax + 8]
mov eax, dword [ecx + esi*4]
pop esi
pop ebp
ret
mov esi, dword [esi + 0xc]
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
pop esi
pop ebp
ret

Function at 0x413030
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 8]
test eax, eax
je 0x4130d3
mov eax, dword [edi + 0xc]
push esi
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x413099
mov ecx, dword [0x454e60]
push ecx
push 0x14
call fcn.00414030
mov esi, eax
add esp, 8
test esi, esi
je 0x413082
mov edx, dword [edi + 4]
push 4
inc edx
mov ecx, esi
push edx
call fcn.00415050
mov dword [esi], 0x4272f0
jmp 0x413084
xor esi, esi
push esi
mov ecx, edi
call fcn.00412d20
mov eax, dword [edi + 0xc]
push esi
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esi + 0x10]
mov eax, dword [edi + 4]
cmp eax, ecx
jl 0x4130c3
sub eax, ecx
mov dword [ebp + 8], 0
inc eax
test eax, eax
jle 0x4130c3
push ebx
mov ebx, eax
lea edx, [ebp + 8]
mov ecx, esi
push edx
call fcn.004151c0
dec ebx
jne 0x4130b4
pop ebx
mov eax, dword [edi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [ebp + 0xc]
pop esi
mov dword [ecx + eax*4], edx
pop edi
pop ebp
ret
mov ecx, dword [edi + 0xc]
mov eax, dword [ebp + 0xc]
push eax
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop ebp
ret
Function at 0x413ce0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov al, byte [0x454df0]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
test al, al
je 0x413d32
mov al, byte [0x454e58]
test al, al
je 0x413d32
call edi
mov esi, eax
mov eax, dword [0x454e5c]
cmp eax, esi
jne 0x413d20
cmp dword [0x454e50], 1
jne 0x413d1b
inc dword [0x454e54]
jmp 0x413d32
call fcn.00412f80
mov eax, dword [0x454e4c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [0x454e5c], esi
mov al, byte [0x454df0]
mov esi, dword [0x454e80]
test al, al
je 0x413d8a
mov al, byte [0x454e58]
test al, al
je 0x413d8a
call edi
cmp dword [0x454e5c], eax
je 0x413d59
call fcn.00412f80
cmp dword [0x454e50], 1
jne 0x413d73
mov eax, dword [0x454e54]
test eax, eax
je 0x413d73
dec eax
mov dword [0x454e54], eax
jmp 0x413d8a
mov ecx, dword [0x454e4c]
mov dword [0x454e5c], 0
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x413da3
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call esi
add esp, 0xc
test eax, eax
je 0x413dde
mov al, byte [0x454e20]
test al, al
je 0x413dd7
push 0x430a00
mov ecx, 0x455428
call fcn.004251c2
push 0x412900
push 0xa
mov ecx, eax
call fcn.00425000
mov ecx, eax
call fcn.004128e0
push 1
call fcn.00415d7b
push 1
call fcn.00415d7b
pop edi
pop esi
pop ebp
ret

Function at 0x415bd0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
mov al, byte [0x454fd0]
test al, al
jne 0x415c16
lea eax, [ebp - 0x190]
push eax
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x415c0f
push 0x31b
push 0x430b38
push 0x430b70
call fcn.00413ce0
add esp, 0xc
mov byte [0x454fd0], 1
mov esp, ebp
pop ebp
ret