joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f7270
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5aff60
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push ebp
push esi
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], 0xba78a4
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x6c], esi
mov eax, dword [ebp + 8]
push eax
call dword [0x5b6094]
mov edx, dword [ebp]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x74]
mov ecx, ebp
push eax
call dword [edx + 0x30]
cmp dword [ebx + 0x68], esi
je 0x4f73ef
mov ecx, dword [ebp + 8]
push edi
push 6
push ecx
call dword [0x5b61f4]
push eax
call fcn.0059f430
mov dword [esp + 0x78], eax
mov eax, dword [ebx + 0x6c]
mov ecx, dword [eax + 0x10]
cmp ecx, 0x3c
jne 0x4f7330
mov dword [esp + 0x14], esi
mov ecx, dword [eax + 0x10]
cmp ecx, esi
jne 0x4f72f7
xor eax, eax
jmp 0x4f72fa
mov eax, dword [eax + 8]
mov edx, dword [eax]
mov ecx, dword [esp + 0x7c]
lea eax, [esp + 0x14]
mov dword [esp + 0x18], edx
push eax
call fcn.0059f134
mov eax, dword [ebx + 0x6c]
cmp dword [eax + 0x10], esi
je 0x4f7319
mov esi, dword [eax + 8]
mov ecx, 0xf
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x18]
xor esi, esi
mov dword [esp + 0x2c], ecx
jmp 0x4f736b
lea edx, [esp + 0x2c]
push edx
push 0x3c
push 0x11
call dword [0x5b61a8]
push eax
call dword [0x5b61ac]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
call fcn.0059f134
mov edx, dword [esp + 0x18]
mov dword [esp + 0x2c], edx
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.00550b30
mov edx, dword [ebp]
add esp, 8
lea eax, [esp + 0x1c]
mov ecx, ebp
push eax
call dword [edx + 0x28]
mov eax, dword [ebx + 0x70]
lea edx, [esp + 0x24]
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [ebp + 8]
push eax
call dword [0x5b6208]
mov eax, dword [ebx + 0x4c]
mov edx, dword [esp + 0x24]
mov ecx, dword [ebx + 0x70]
sub eax, edx
cdq
mov edi, dword [ebp]
sub eax, edx
mov edx, dword [ecx - 8]
push edx
push ecx
sar eax, 1
push 0x14
push eax
mov ecx, ebp
call dword [edi + 0x5c]
mov ecx, dword [ebx + 0x4c]
mov edx, dword [esp + 0x28]
mov dword [ebx + 0x24], ecx
mov ecx, dword [esp + 0x78]
add edx, 0x14
mov dword [ebx + 0x20], esi
mov dword [ebx + 0x1c], esi
mov dword [ebx + 0x28], edx
mov eax, dword [ebp]
push ecx
mov ecx, ebp
call dword [eax + 0x28]
lea ecx, [esp + 0x1c]
call fcn.0059f49c
pop edi
mov eax, dword [esp + 0xc]
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x30]
mov dword [esp + 0x18], 0xba7898
lea ecx, [esp + 0x18]
mov dword [esp + 0x6c], 1
call fcn.0059f49c
mov ecx, dword [esp + 0x64]
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x64
ret 8
Function at 0x4f8fd0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5b01c3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
mov dword [esp + 4], esi
mov eax, dword [0xbec158]
mov dword [esp + 0x14], 0
mov dword [esi + 0x14], eax
push ecx
lea edx, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0xc], esp
push edx
mov byte [esp + 0x1c], 1
mov dword [esi], 0xba78d4
call fcn.005980b5
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x38]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x3c]
mov dword [eax + 8], ecx
mov ecx, esi
mov dword [eax + 0xc], edx
call fcn.004f9080
lea ecx, [esp + 0x2c]
mov dword [esp + 0x14], 0xffffffff
call fcn.00598340
mov ecx, dword [esp + 0xc]
mov eax, esi
mov dword fs:[0], ecx
pop esi
add esp, 0x14
ret 0x14
Function at 0x4fb030
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5b04c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.004fabe0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.004fac60
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.004fac60
lea ecx, [esi + 0xc]
call fcn.005982cb
lea ecx, [esi + 0x10]
call fcn.005982cb
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.004fd2d0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.004fd2d0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.004fd2d0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.00598340
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00598340
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x5145c0
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5b18f0
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x514767
mov ecx, dword [0xbec158]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x5146bc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.005132e0
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.0059842d
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.00598340
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0xbdca98
call fcn.005983ae
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.005136a0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.0059842d
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.00598340
lea ecx, [esp + 0xc]
call fcn.0059882f
mov ecx, dword [esp + 0xc]
push 0xbdd4d4
push ecx
call fcn.00584f44
add esp, 8
test eax, eax
je 0x5146e4
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x51461d
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.00598340
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.00598340
jmp 0x51476b
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.00514360
test eax, eax
push 0
je 0x51474f
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.00512a00
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x514735
cmp eax, 0x64
jg 0x514723
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [0x5b6464]
mov esi, eax
jmp 0x5146c0
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [0x5b6464]
mov esi, eax
jmp 0x5146c0
cmp eax, 0x64
jge 0x5146bc
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [0x5b6464]
mov esi, eax
jmp 0x5146c0
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.00512a00
mov esi, eax
jmp 0x5146c0
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x514775
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x53bba0
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x5b3e38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.0059f19d
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov ecx, esi
mov dword [esp + 0x44], 0
call fcn.0053bae0
mov ecx, dword [esi + 0x174]
mov eax, dword [esi + 0x178]
add ecx, 0x64
add eax, 0x64
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.0059f0cb
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [0x5b67a8]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x53bc67
cmp dword [esp + 0x40], 1
jne 0x53bc65
cmp ecx, eax
jge 0x53bc67
mov eax, ecx
cmp eax, 0x12c
jge 0x53bc73
mov eax, 0x12c
mov ecx, esi
mov dword [esi + 0x194], eax
mov dword [esi + 0x1dc], 1
call fcn.0053bcc0
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [0x5b67a4]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0059f20f
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x564e00
Capabilities:
Enumerate pe sections

Disassembly:
push esi
mov esi, dword [esp + 8]
mov cl, byte [esi + 0x41]
mov eax, dword [esi + 0x18]
test cl, cl
jne 0x564e1d
mov eax, dword [esp + 0xc]
pop esi
mov dword [eax], 1
xor eax, eax
ret
mov ecx, dword [esi + 0x1c]
xor edx, edx
inc ecx
mov word [esi + 0x3a], 0
mov dword [esi + 0x1c], ecx
mov dx, word [eax + 0x14]
cmp ecx, edx
jl 0x564eda
mov cl, byte [eax + 4]
test cl, cl
jne 0x564e78
mov edx, dword [eax + 0x44]
xor ecx, ecx
mov cl, byte [eax + 8]
lea eax, [ecx + edx + 8]
push eax
call fcn.005638e0
push eax
push esi
call fcn.00564a40
add esp, 0xc
test eax, eax
jne 0x564ef8
push esi
call fcn.00564aa0
mov ecx, dword [esp + 0x10]
add esp, 4
mov dword [ecx], 0
pop esi
ret
push eax
call fcn.00564f00
add esp, 4
test eax, eax
jne 0x564eab
push esi
call fcn.00564f40
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
xor edx, edx
add esp, 4
mov dx, word [eax + 0x14]
cmp ecx, edx
jl 0x564ebd
push eax
call fcn.00564f00
add esp, 4
test eax, eax
je 0x564e85
mov eax, dword [esp + 0xc]
mov dword [eax], 1
mov byte [esi + 0x41], 0
xor eax, eax
pop esi
ret
mov ecx, dword [esp + 0xc]
mov dword [ecx], 0
mov dl, byte [eax + 6]
test dl, dl
je 0x564eeb
push ecx
push esi
call fcn.00564e00
add esp, 8
pop esi
ret
mov ecx, dword [esp + 0xc]
mov dword [ecx], 0
mov cl, byte [eax + 4]
test cl, cl
je 0x564eef
xor eax, eax
pop esi
ret
push esi
call fcn.00564aa0
add esp, 4
pop esi
ret
Function at 0x401170
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 4]
push edi
test eax, eax
push edi
jne 0x401183
push edi
push edi
jmp 0x401186
push eax
push 3
push str.File_Secure
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 0xc], eax
jne 0x4011b1
mov ecx, esi
call fcn.00401640
mov edi, eax
test edi, edi
jne 0x4011aa
mov edi, 0x3e8
mov ecx, esi
call fcn.00401230
mov eax, edi
pop edi
pop esi
ret

Function at 0x401c00
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
lea eax, [esp + 8]
push esi
push eax
push 0x20019
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
je 0x401c35
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x401c75
push esi
call fcn.00401020
mov eax, esi
pop esi
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
test esi, esi
je 0x401c6a
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x401c6a
push esi
call fcn.00401020
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
ret
Function at 0x401c80
Capabilities:
Set registry value

Disassembly:
mov edx, dword [esp + 4]
push ebx
push ebp
push esi
test edx, edx
push edi
je 0x401e27
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401e27
cmp byte [eax], 0
je 0x401e27
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x401e27
cmp byte [edi], 0
je 0x401e27
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x401e27
cmp byte [ebp], 0
je 0x401e27
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x401e27
cmp byte [ecx], 0
je 0x401e27
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x18]
push ecx
push 0x2000f
push 0
push eax
push edx
call esi
test eax, eax
je 0x401d12
push eax
call fcn.00401f20
add esp, 4
mov eax, 0x4651
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
push 0x2000f
push 0
push edi
push eax
call esi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x401d71
lea ecx, [esp + 0x20]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
push 0
push 0x2000f
push 0
push 0
push 0
push edi
push eax
call ebx
test eax, eax
je 0x401d71
push eax
call fcn.00401f20
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 0x4652
pop ebx
ret
mov edx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call edi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
push 0x2000f
push 0
push ebp
push ecx
call esi
test eax, eax
je 0x401dd3
lea edx, [esp + 0x20]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
push eax
push 0
push 0x2000f
push 0
push 0
push 0
push ebp
push ecx
call ebx
test eax, eax
je 0x401dd3
push eax
call fcn.00401f20
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call edi
pop edi
pop esi
pop ebp
mov eax, 0x4653
pop ebx
ret
mov eax, dword [esp + 0x14]
push eax
call edi
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x24]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x401e19
push eax
call fcn.00401f20
mov eax, dword [esp + 0x20]
add esp, 4
push eax
call edi
pop edi
pop esi
pop ebp
mov eax, 0x4654
pop ebx
ret
mov ecx, dword [esp + 0x1c]
push ecx
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
ret

Function at 0x401e80
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x410
lea eax, [esp]
push eax
push 0x20019
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401eaf
xor eax, eax
add esp, 0x410
ret
lea eax, [esp + 4]
push esi
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x424]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
push edx
push 0
push eax
push ecx
mov esi, 1
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x401eef
xor esi, esi
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x410
ret
Function at 0x402250
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x44
push esi
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 8]
mov edx, dword [esp + 0x54]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x58]
lea ecx, [esp + 8]
xor esi, esi
push eax
mov eax, dword [esp + 0x54]
push ecx
push esi
push esi
push esi
push esi
push esi
push esi
push edx
push eax
mov dword [esp + 0x30], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4022a2
mov ecx, dword [esp + 0x5c]
mov esi, 0x3f
test ecx, ecx
je 0x4022a2
call fcn.00401070
mov eax, esi
pop edi
pop esi
add esp, 0x44
ret
Function at 0x4033d0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push edi
xor edi, edi
cmp eax, edi
jne 0x4033e8
mov eax, 4
pop edi
add esp, 8
ret
mov ecx, dword [esp + 0x14]
push ebx
push ebp
push esi
push 0x4091e4
push eax
mov dword [ecx], 1
xor esi, esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, edi
jne 0x403421
mov dword [esp + 0x1c], 0x49
jmp 0x403578
push 0xc350
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, edi
jne 0x403441
mov dword [esp + 0x1c], 0x3a
jmp 0x403578
mov edi, str.14d734af_f56a_11d5_b33a_000244035579
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
push str.B1F16735_EBB5_4847_8410_FB5EB6F4A208
mov ebx, ecx
call fcn.004022b0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x403578
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x403485
mov dword [esp + 0x1c], 2
jmp 0x403589
push ebp
push 0xc350
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov edi, eax
add ebx, ebx
cmp edi, ebx
jle 0x4034ed
push 0x5f
push edi
push esi
call fcn.00402350
mov eax, dword [esp + 0x1c]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4034f1
mov ecx, 1
push 1
sub ecx, ebx
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x40350c
push ebp
push 0xc350
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov edi, eax
jmp 0x40349b
mov eax, dword [esp + 0x14]
cmp edi, ebx
jle 0x403516
sub ebx, esi
push 1
sub ebx, edi
add ebx, eax
push ebx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
je 0x403516
mov dword [esp + 0x1c], 0x4a
jmp 0x403578
push ebp
mov ecx, 0x30d4
xor eax, eax
mov edi, esi
push 0xc34f
push 1
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jne 0x403550
mov edx, dword [ebp + 0xc]
and dl, 0x10
neg dl
sbb edx, edx
and edx, 0x789
add edx, 0x4b
mov dword [esp + 0x1c], edx
jmp 0x403578
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x403568
mov dword [esp + 0x1c], 0x7d4
jmp 0x403578
push esi
call dword [sym.imp.MSVCRT.dll_atol]
mov ecx, dword [esp + 0x24]
add esp, 4
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x403589
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
test esi, esi
je 0x403596
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
test ebp, ebp
je 0x4035a4
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret

Function at 0x403700
Capabilities:
Create thread

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0
push 0
push 0x403720
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ecx
ret
Function at 0x403730
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x405190
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
lea ecx, [esp]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp]
mov dword [esp + 0x2c], 0
push eax
call fcn.004036c0
add esp, 4
lea ecx, [esp]
push str.fstmpfspInst.exe
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 8]
call sub.MFC42.DLL_CFileFind::CFileFind
mov ecx, dword [esp]
push 0
push ecx
lea ecx, [esp + 0x10]
mov byte [esp + 0x34], 1
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x4037cb
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea edx, [esp + 0xc]
lea ecx, [esp + 0x10]
push edx
mov esi, eax
call sub.MFC42.DLL_CFileFind::GetFilePath
mov eax, dword [eax]
push eax
call edi
lea ecx, [esp + 0xc]
call fcn.00404c50
test esi, esi
jne 0x40379e
pop edi
pop esi
lea ecx, [esp + 8]
mov byte [esp + 0x2c], 0
call fcn.00404d88
lea ecx, [esp]
mov dword [esp + 0x2c], 0xffffffff
call fcn.00404c50
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
Function at 0x406e90
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x406fdf
mov eax, dword [esi + 0x24]
push 0x4188e8
push str.libusb_close
push 4
mov edi, dword [eax + 4]
push edi
call fcn.004078c0
add esp, 0x10
lea ebx, [edi + 0xd8]
push dword [edi + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x406fe3
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [edi + 0xf4]
mov edx, dword [edi + 0xf0]
lea eax, [ecx + 1]
mov dword [edi + 0xf4], eax
test ecx, ecx
jne 0x406efd
mov eax, edx
or eax, 0x20
mov dword [edi + 0xf0], eax
test edx, edx
jne 0x406f2c
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x406f2c
xor ecx, ecx
call fcn.0040a810
push eax
push str.SetEvent_failed:__s
push str.usbi_signal_event
push 2
push 0
call fcn.004078c0
add esp, 0x14
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call ebx
lea eax, [edi + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, esi
mov dword [edi + 0xb4], 1
mov ecx, edi
call fcn.00406ca0
lea eax, [edi + 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add dword [edi + 0xf4], 0xffffffff
jne 0x406f72
and dword [edi + 0xf0], 0xffffffdf
cmp dword [edi + 0xf0], 0
jne 0x406fa6
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x406fa6
xor ecx, ecx
call fcn.0040a810
push eax
push str.ResetEvent_failed:__s
push str.usbi_clear_event
push 2
push 0
call fcn.004078c0
add esp, 0x14
lea eax, [edi + 0xd8]
push eax
call ebx
lea eax, [edi + 0x9c]
mov dword [edi + 0xb4], 0
push eax
call ebx
lea esi, [edi + 0xbc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [edi + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_WakeAllConditionVariable]
push esi
call ebx
pop edi
pop esi
pop ebx
ret
mov ecx, edi
mov edx, esi
pop edi
pop esi
pop ebx
jmp fcn.00406ca0
Function at 0x408b40
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
mov edi, ecx
lea eax, [edi + 0x84]
push eax
call esi
lea eax, [edi + 0x9c]
push eax
call esi
lea eax, [edi + 0xbc]
push eax
call esi
lea eax, [edi + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeConditionVariable]
lea eax, [edi + 0xd8]
push eax
call esi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi + 0xb8], eax
lea eax, [edi + 0x7c]
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0xf8]
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x100]
push 0
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x110]
push 0
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x118]
push 1
push 0
mov dword [eax + 4], eax
mov dword [eax], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0xc], eax
test eax, eax
jne 0x408bf6
xor ecx, ecx
call fcn.0040a810
push eax
push str.CreateEvent_failed:__s
push str.usbi_create_event
push 1
push 0
call fcn.004078c0
mov ebx, 0xffffff9d
jmp 0x408cdc
push ecx
mov edx, eax
mov ecx, edi
call fcn.0040a530
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
add esp, 4
test ebx, ebx
js 0x408cb8
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
mov dword [edi + 0x10], eax
test eax, eax
jne 0x408c5f
xor ecx, ecx
call fcn.0040a810
push eax
push str.CreateWaitableTimer_failed:__s
push str.usbi_create_timer
push 2
push 0
call fcn.004078c0
add esp, 0x14
push str.timer_not_available_for_timeouts
push str.usbi_io_init
push 4
push edi
call fcn.004078c0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
ret
push str.using_timer_for_timeouts
push str.usbi_io_init
push 4
push edi
call fcn.004078c0
mov edx, dword [edi + 0x10]
add esp, 0xc
mov ecx, edi
call fcn.0040a530
mov ebx, eax
add esp, 4
test ebx, ebx
jns 0x408c59
push dword [edi + 0x10]
call esi
test eax, eax
jne 0x408cae
xor ecx, ecx
call fcn.0040a810
push eax
push str.CloseHandle_failed:__s
push str.usbi_destroy_timer
push 2
push 0
call fcn.004078c0
add esp, 0x14
mov edx, dword [edi + 0xc]
mov ecx, edi
call fcn.0040a5f0
push dword [edi + 0xc]
call esi
test eax, eax
jne 0x408cdf
xor ecx, ecx
call fcn.0040a810
push eax
push str.CloseHandle_failed:__s
push str.usbi_destroy_event
push 2
push 0
call fcn.004078c0
add esp, 0x14
mov esi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea eax, [edi + 0x84]
push eax
call esi
lea eax, [edi + 0x9c]
push eax
call esi
lea eax, [edi + 0xbc]
push eax
call esi
lea eax, [edi + 0xd8]
push eax
call esi
push dword [edi + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsFree]
pop edi
pop esi
mov eax, ebx
pop ebx
ret