joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e860
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x1c
cmp dword [esp + 0x20], 0
push esi
push edi
mov esi, eax
mov edi, ecx
jne 0x40e9f2
test ebx, ebx
je 0x40e9f2
call fcn.0040be80
push eax
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 0x18]
sub eax, 0
je 0x40e94e
sub eax, 1
jne 0x40ea49
cmp byte [edi + 0x275], al
je 0x40e8bc
add edi, 0x21c
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
add esp, 0x1c
ret
lea ecx, [edi + 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov edx, dword [edi + 0x27c]
push ebx
add edx, 0x44
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, dword [edi + 0x264]
mov ecx, dword [edi + 0x268]
mov edx, dword [edi + 0x26c]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x270]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x278]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x27c]
lea eax, [esp + 8]
lea edx, [edi + 8]
push eax
mov dword [esp + 0x20], edx
push ecx
mov ecx, 3
mov edx, edi
mov dword [esp + 0x28], ebx
call fcn.0040e240
add esp, 8
mov eax, edi
call fcn.0040e7f0
test al, al
jne 0x40ea49
mov byte [edi + 0x275], 1
pop edi
pop esi
add esp, 0x1c
ret
cmp byte [edi + 0x275], 0
je 0x40e967
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
add esp, 0x1c
ret
add dword [esi + 0x28], ebx
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x24]
jae 0x40e987
add dword [esi + 0x20], ebx
sub dword [esi + 0x1c], ebx
push edi
call fcn.0040e5e0
add esp, 4
pop edi
pop esi
add esp, 0x1c
ret
lea edx, [esi + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, dword [edi + 0x268]
mov edx, dword [edi + 0x26c]
mov eax, dword [edi + 0x264]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x278]
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x30]
mov dword [esp + 0x18], ecx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x270]
mov dword [esp + 0x1c], edx
mov edx, dword [edi + 0x27c]
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x28]
push edx
mov ecx, 2
mov edx, edi
mov dword [esp + 0x28], eax
call fcn.0040e240
add esp, 8
pop edi
pop esi
add esp, 0x1c
ret
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 4
lea edx, [esp + 0x2c]
push edx
mov eax, 1
push 0x80
mov word [esp + 0x34], ax
mov eax, dword [edi + 0x260]
push 0xffff
xor ecx, ecx
push eax
mov byte [edi + 0x275], 1
mov word [esp + 0x3e], cx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [edi + 0x260]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x260], 0xffffffff
pop edi
pop esi
add esp, 0x1c
ret
Function at 0x40eb20
Capabilities:
Create tcp socket
Create udp socket
Get system information on windows
Set socket configuration

Disassembly:
sub esp, 0x38
push edi
push 0x4c
call fcn.00408b20
mov edi, eax
add esp, 4
test edi, edi
je 0x40eca6
lea eax, [esp + 0x18]
push eax
mov dword [edi], 0x494f4350
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x2c]
lea eax, [edi + 0x20]
lea edx, [ecx + ecx]
push eax
mov dword [edi + 4], edx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 0x10], eax
test eax, eax
je 0x40ec9f
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [edi + 8], eax
test eax, eax
je 0x40ec9f
call fcn.0040bb10
mov dword [edi + 0xc], eax
test eax, eax
je 0x40ec9f
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [edi + 0x14], eax
cmp eax, 0xffffffff
je 0x40ec9f
push 1
lea ecx, [esp + 0xb]
push ecx
push 4
push 0xffff
push eax
mov byte [esp + 0x1b], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x44]
xor eax, eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov dword [esp + 0x12], eax
mov word [esp + 0x16], ax
mov eax, dword [esp + 0x40]
mov edx, 2
push ecx
mov word [esp + 0xc], dx
mov dword [esp + 0x10], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [esp + 0xc]
mov word [esp + 0xe], ax
mov eax, dword [edi + 0x14]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40ec9f
mov ecx, dword [edi + 0x14]
push bind
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x40ec9f
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [edi + 0x18], eax
test eax, eax
je 0x40ec9f
mov edx, dword [edi + 0x14]
push 8
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x40ec9f
push esi
xor esi, esi
cmp dword [edi + 4], esi
jbe 0x40ec7f
mov eax, dword [edi + 0xc]
push 0
push 0
push edi
push 0x40ea50
push 0
push eax
call fcn.0040bbc0
inc esi
add esp, 0x18
cmp esi, dword [edi + 4]
jb 0x40ec61
mov ecx, dword [edi + 0xc]
push 0
push 0
push edi
push 0x40e420
push 0
push ecx
call fcn.0040bbc0
add esp, 0x18
pop esi
mov eax, edi
pop edi
add esp, 0x38
ret
call fcn.0040e100
xor eax, eax
pop edi
add esp, 0x38
ret
Function at 0x40ef4d
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40ef7e
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x40ef85
cmp ebx, dword [ebp + 8]
jae 0x40ef85
xor eax, eax
jmp 0x40f16b
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40ef96
xor eax, eax
inc eax
jmp 0x40f16a
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40efa8
cmp ecx, edx
jae 0x40f00c
cmp dword [eax + 4], 0
je 0x40efb1
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40ef9d
cmp dword [ebp + 8], 0
je 0x40efcb
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40f00c
cmp eax, esi
jae 0x40f00c
mov ecx, dword [0x417878]
mov esi, ebx
and esi, 0xfffff000
xor eax, eax
test ecx, ecx
jle 0x40efed
cmp dword [eax*4 + 0x417880], esi
je 0x40f013
inc eax
cmp eax, ecx
jl 0x40efdf
lea eax, [ebp + 8]
push eax
push 0x1c
lea eax, [ebp - 0x20]
push eax
push 0
push ebx
or edi, 0xffffffff
push edi
call sub.ntdll.dll_NtQueryVirtualMemory
test eax, eax
jl 0x40f083
mov eax, dword [ebp + 8]
jmp 0x40f085
xor eax, eax
jmp 0x40f16a
test eax, eax
jle 0x40ef8e
xor edx, edx
mov ebx, 0x4178c0
inc edx
mov edi, ebx
xchg dword [edi], edx
test edx, edx
jne 0x40ef8e
cmp dword [eax*4 + 0x417880], esi
je 0x40f062
lea eax, [ecx - 1]
test eax, eax
jl 0x40f04f
cmp dword [eax*4 + 0x417880], esi
je 0x40f04b
dec eax
jns 0x40f03f
test eax, eax
jge 0x40f060
cmp ecx, 0x10
jge 0x40f05b
inc ecx
mov dword [0x417878], ecx
lea eax, [ecx - 1]
jmp 0x40f062
je 0x40f07a
xor edx, edx
test eax, eax
jl 0x40f07a
lea ecx, [edx*4 + 0x417880]
mov edi, dword [ecx]
inc edx
cmp edx, eax
mov dword [ecx], esi
mov esi, edi
jle 0x40f068
xor eax, eax
xchg dword [ebx], eax
jmp 0x40ef8e
xor eax, eax
test eax, eax
je 0x40f168
cmp dword [ebp - 8], 0x1000000
jne 0x40f168
test byte [ebp - 0xc], 0xcc
je 0x40f0fa
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40f168
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40f168
cmp word [eax + 0x18], 0x10b
jne 0x40f168
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40f168
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40f0fa
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40f0fa
test byte [ecx + 0x27], 0x80
jne 0x40f00c
xor eax, eax
inc eax
mov ecx, eax
mov edx, 0x4178c0
xchg dword [edx], ecx
test ecx, ecx
jne 0x40f16a
mov ecx, dword [0x417878]
test ecx, ecx
mov edx, ecx
jle 0x40f129
lea eax, [ecx*4 + 0x41787c]
cmp dword [eax], esi
je 0x40f129
dec edx
sub eax, 4
test edx, edx
jg 0x40f11d
test edx, edx
jne 0x40f15a
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40f136
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40f14e
lea eax, [edx*4 + 0x417880]
mov edi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], esi
mov esi, edi
jle 0x40f13c
cmp ecx, 0x10
jge 0x40f15a
inc ecx
mov dword [0x417878], ecx
xor eax, eax
mov ecx, 0x4178c0
xchg dword [ecx], eax
jmp 0x40ef8e
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402240
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push ebx
sub esp, 0x64
and esp, 0xfffffff0
call fcn.00406320
call fcn.00402440
call sub.KERNEL32.dll_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call sub.KERNEL32.dll_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x402278
jmp 0x402316
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
or eax, edx
test al, 1
jne 0x402277
cmp cl, 0x22
je 0x4022d0
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x4022f0
lea esi, [esi]
lea edi, [edi]
test cl, cl
je 0x4022f0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
jne 0x4022b0
jmp 0x4022f0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x22
setne al
xor edx, edx
test cl, cl
setne dl
test eax, edx
jne 0x4022d0
cmp cl, 0x22
je 0x402352
lea esi, [esi]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
jmp 0x402310
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete dl
cmp cl, 9
sete al
or eax, edx
test al, 1
jne 0x402300
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
test byte [ebp - 0x2c], 1
mov edx, 0xa
je 0x402334
movzx edx, word [ebp - 0x28]
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.004024b0
sub esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
inc ebx
movzx ecx, byte [ebx]
jmp 0x4022f0
Function at 0x404f50
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x404f86
mov dword [0x40e080], eax
mov edx, 0x404f30
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.mingwm10.dll___mingwthr_key_dtor
test eax, eax
sete al
movzx eax, al
mov dword [0x407050], eax
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [0x407050], eax
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp - 0xc]
sub esp, 0x68
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], 0x403200
mov dword [ebp - 0x24], 0x406dd0
mov dword [ebp - 0x1c], 0x405130
mov dword [ebp - 0x18], esp
mov dword [esp], eax
call fcn.004058d0
cmp dword [0x407050], 0
mov dword [ebp - 0x44], 0x40e090
je 0x405110
jl 0x405150
mov dword [ebp - 0x3c], 1
mov eax, dword [0x40e080]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x54]
sub esp, 4
test eax, eax
mov dword [ebp - 0x48], eax
je 0x4051f3
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
lea esi, [esi]
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.004059b0
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov edx, dword [0x407060]
mov eax, 0xffffffff
test edx, edx
je 0x40516a
mov eax, dword [0x407054]
test eax, eax
je 0x4051aa
xor eax, eax
test eax, eax
jne 0x4051a0
mov edi, dword [0x407050]
test edi, edi
js 0x4051a0
mov dword [ebp - 0x44], 0x40e090
mov ebx, dword [0x407050]
test ebx, ebx
je 0x405110
jmp 0x4050be
xor esi, esi
mov dword [0x407050], esi
jmp 0x405178
mov dword [esp], 0x407058
mov dword [ebp - 0x3c], 1
call sub.KERNEL32.dll_InterlockedIncrement
sub esp, 4
test eax, eax
je 0x405231
mov eax, dword [0x407054]
test eax, eax
jne 0x405168
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x3c], 1
call eax
sub esp, 4
mov eax, dword [0x407054]
test eax, eax
je 0x4051cd
jmp 0x405168
mov dword [esp], 8
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x48], eax
test eax, eax
je 0x405225
mov dword [esp + 4], eax
mov eax, dword [0x40e080]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
xor edx, edx
test eax, eax
je 0x40525a
test edx, edx
je 0x405245
mov dword [ebp - 0x3c], 1
call fcn.00404ad0
call fcn.00404f50
mov eax, 1
mov dword [0x407054], eax
jmp 0x405168
mov eax, dword [ebp - 0x48]
mov dword [eax], 0
mov dword [eax + 4], 0
jmp 0x405106
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
jmp 0x405221
Function at 0x4057c0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x40e0e0]
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x405800
mov dword [ebx + 0x2c], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.mingwm10.dll___mingwthr_key_dtor
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x40e0e0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x405c8c
mov ecx, dword [eax + 0x30]
test ecx, ecx
js 0x405ca1
mov edx, dword [eax + 0x30]
test edx, edx
jne 0x405c60
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
jmp 0x405bf8
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
xor ecx, ecx
test eax, eax
mov edx, 5
je 0x405c08
mov ecx, dword [eax + 0x18]
xor edx, edx
cmp edx, 5
je 0x405c53
test edx, edx
jne 0x405c46
test ecx, ecx
je 0x405bf0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp], 1
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call ecx
cmp eax, 6
je 0x405cb0
cmp eax, 8
je 0x405bf0
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
mov eax, 5
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x405be2
call fcn.00405580
mov eax, dword [0x40e0e0]
mov ecx, dword [eax + 0x30]
test ecx, ecx
jns 0x405bd4
call fcn.00405820
mov eax, dword [0x40e0e0]
jmp 0x405bd4
mov dword [edi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov edx, ebx
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.00405b20
cmp eax, 7
jne 0x405c4b
mov eax, dword [0x40e0e0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x405d03
mov edi, dword [eax + 0x30]
test edi, edi
js 0x405d2e
mov esi, dword [eax + 0x30]
test esi, esi
jne 0x405d0f
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.00405580
mov eax, dword [0x40e0e0]
jmp 0x405ce1
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x405cf2
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405cf2
call fcn.00405820
mov eax, dword [0x40e0e0]
jmp 0x405ce8
Function at 0x405f90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x40e0e0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x406024
mov esi, dword [eax + 0x30]
test esi, esi
js 0x406040
mov ebx, dword [eax + 0x30]
test ebx, ebx
jne 0x406060
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x406018
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.00405b20
cmp eax, 7
jne 0x4060df
mov eax, dword [0x40e0e0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x4060b6
mov edx, dword [eax + 0x30]
test edx, edx
js 0x4060d0
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x406090
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.00405d40
jmp 0x405fd5
call fcn.00405580
mov eax, dword [0x40e0e0]
mov esi, dword [eax + 0x30]
test esi, esi
jns 0x405fb0
lea esi, [esi]
call fcn.00405820
mov eax, dword [0x40e0e0]
mov ebx, dword [eax + 0x30]
test ebx, ebx
je 0x405fbb
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x405fbe
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x406007
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406007
call fcn.00405580
mov eax, dword [0x40e0e0]
mov edx, dword [eax + 0x30]
test edx, edx
jns 0x405ff9
nop
lea esi, [esi]
call fcn.00405820
mov eax, dword [0x40e0e0]
jmp 0x405ff9
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x4060f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov esi, dword [edi + 0xc]
test esi, esi
je 0x406182
mov eax, dword [0x40e0e0]
test eax, eax
je 0x406176
mov ebx, dword [eax + 0x30]
test ebx, ebx
js 0x4061f1
mov ecx, dword [eax + 0x30]
test ecx, ecx
jne 0x406197
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.00405d40
cmp eax, 7
jne 0x40620f
mov eax, dword [0x40e0e0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x4061e2
mov edx, dword [eax + 0x30]
test edx, edx
js 0x406200
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x4061c3
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.00405580
mov eax, dword [0x40e0e0]
jmp 0x406112
mov dword [esp], edi
call fcn.00405bb0
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x406127
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x406165
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406165
call fcn.00405580
mov eax, dword [0x40e0e0]
jmp 0x406150
call fcn.00405820
mov eax, dword [0x40e0e0]
jmp 0x40611d
call fcn.00405820
mov eax, dword [0x40e0e0]
jmp 0x40615b
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x401760
Capabilities:
Check if file exists
Get file attributes

Disassembly:
lea ecx, [esp + 4]
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40177f
test al, 0x10
jne 0x40177f
mov eax, 1
ret
xor eax, eax
ret

Function at 0x401990
Capabilities:
Delete file
Set file attributes

Disassembly:
push 0x80
lea ecx, [esp + 8]
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 4]
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
ret

Function at 0x4019c0
Capabilities:
Check if file exists
Get file attributes
Move file

Disassembly:
push 0xffffffffffffffff
push 0x419238
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x423080]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 4]
mov dword [esp + 4], eax
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401a04
test al, 0x10
je 0x401a16
xor eax, eax
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
add esp, 0x1c
ret
mov ecx, dword [esp + 0x28]
push 1
push ecx
lea edx, [esp + 0x10]
push edx
call fcn.00414ff0
mov dword [esp + 0x28], 0
mov eax, dword [eax]
push eax
call fcn.00401a70
add esp, 0x10
lea ecx, [esp + 8]
call fcn.004010a0
push 1
lea ecx, [esp + 0x2c]
call fcn.00401000
push eax
lea ecx, [esp + 0x2c]
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
add esp, 0x1c
ret
Function at 0x401a70
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
push 0x41f370
push eax
call fcn.00401470
add esp, 8
test eax, eax
je 0x401a8f
xor eax, eax
add esp, 0x10
ret
mov ecx, dword [esp + 0x14]
mov dword [esp], ecx
push edi
lea ecx, [esp + 4]
call fcn.00401000
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x401ab2
test al, 0x10
jne 0x401acc
lea ecx, [esp + 0x18]
call fcn.00415e10
dec eax
push eax
lea ecx, [esp + 0x1c]
call fcn.00401450
cmp ax, 0x3a
jne 0x401ad6
mov eax, 1
pop edi
add esp, 0x10
ret
push ebx
push esi
xor esi, esi
push esi
lea ecx, [esp + 0x24]
call fcn.00401450
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test ax, ax
je 0x401b85
push esi
lea ecx, [esp + 0x24]
call fcn.00401450
cmp ax, 0x5c
je 0x401b13
push esi
lea ecx, [esp + 0x24]
call fcn.00401450
cmp ax, 0x2f
jne 0x401b71
test esi, esi
je 0x401b71
lea edx, [esi - 1]
push edx
lea ecx, [esp + 0x24]
call fcn.00401450
cmp ax, 0x3a
je 0x401b71
mov eax, dword [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00401690
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0xc]
call fcn.00401000
push eax
call edi
cmp eax, 0xffffffff
je 0x401b56
test al, 0x10
jne 0x401b68
push 0
lea ecx, [esp + 0x14]
call fcn.00401000
push eax
call ebx
test eax, eax
je 0x401b9a
lea ecx, [esp + 0x10]
call fcn.004010a0
inc esi
push esi
lea ecx, [esp + 0x24]
call fcn.00401450
test ax, ax
jne 0x401af3
push 0
lea ecx, [esp + 0x24]
call fcn.00401000
push eax
call ebx
pop esi
pop ebx
pop edi
add esp, 0x10
ret
lea ecx, [esp + 0x10]
call fcn.004010a0
pop esi
pop ebx
xor eax, eax
pop edi
add esp, 0x10
ret