joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e666
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x428c80]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4291e8]
je 0x40e69b
inc eax
cmp eax, 0x13
jb 0x40e68c
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4291e8]
jne 0x40e7c1
mov eax, dword [0x42bc74]
cmp eax, 1
je 0x40e799
cmp eax, edx
jne 0x40e6cb
cmp dword [0x428b40], 1
je 0x40e799
cmp ecx, 0xfc
je 0x40e7c1
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e701
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040fa70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040a520
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40e735
mov eax, edi
push eax
call fcn.0040a520
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x422ee0
push edi
call fcn.004084d0
add esp, 0x10
push edi
call fcn.0040a520
push dword [esi + 0x4291ec]
mov ebx, eax
call fcn.0040a520
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00408450
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040fa70
push edi
push ebx
call fcn.0040fa80
push 0x422ec0
push ebx
call fcn.0040fa80
push dword [esi + 0x4291ec]
push ebx
call fcn.0040fa80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004126d0
add esp, 0x2c
jmp 0x40e7c1
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4291ec]
push dword [esi]
call fcn.0040a520
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040a50e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret

Function at 0x41093e
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x41096c
add al, 0x40
mov byte [ebp + 8], al
lea eax, [ebp + 8]
push eax
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x410971
cmp eax, 1
je 0x410971
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x410975
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x428c80]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x4109ed
push ebx
call fcn.0041093e
test eax, eax
pop ecx
jne 0x4109bc
call fcn.0040b146
mov dword [eax], 0xf
call fcn.0040b13d
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
pop ebx
call fcn.0040a50e
leave
ret
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4109ff
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4109af
inc eax
cmp eax, 0x104
ja 0x4109af
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x410a37
cmp eax, dword [ebp + 0x10]
jg 0x410a1a
mov eax, dword [ebp + 0x10]
push eax
call fcn.004080e4
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x410a4c
call fcn.0040b13d
mov dword [eax], 0xc
jmp 0x4109af
cmp eax, dword [ebp + 0x10]
jle 0x410a4c
call fcn.0040b13d
mov dword [eax], 0x22
jmp 0x4109af
lea eax, [ebp - 0x108]
push eax
push ecx
call fcn.0040fa70
pop ecx
pop ecx
jmp 0x4109b1
Function at 0x411081
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x411255
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x42d260]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x411255
test cl, 0x48
je 0x4110ec
cmp byte [eax + 5], 0xa
je 0x4110ec
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41113e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x411126
call fcn.0040b13d
mov dword [eax], 9
call fcn.0040b146
mov dword [eax], esi
jmp 0x411136
cmp eax, 0x6d
je 0x411255
push eax
call fcn.0040b14f
pop ecx
or eax, 0xffffffff
jmp 0x411257
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x411250
test eax, eax
je 0x411165
cmp byte [ebx], 0xa
jne 0x411165
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x41116e
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x41124a
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x41123a
cmp al, 0xd
je 0x4111a0
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x41122c
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4111ba
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4111b5
add dword [ebp + 0x10], 2
jmp 0x41120e
mov dword [ebp + 0x10], eax
jmp 0x411228
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4111e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x411228
cmp dword [ebp - 0xc], 0
je 0x411228
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x411203
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41120e
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41122b
cmp ebx, dword [ebp + 0xc]
jne 0x411213
cmp byte [ebp - 1], 0xa
jne 0x411213
mov byte [ebx], 0xa
jmp 0x41122b
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00411632
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41122c
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x411184
jmp 0x41124a
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x41124a
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x411257
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x411307
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x428c80]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x411338
xor eax, eax
jmp 0x4114c1
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x42d260]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x411374
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00412a1e
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41144f
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x41148d
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x4113d8
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4113c9
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x4113a9
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411418
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x411421
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x41139a
jmp 0x411423
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x4114bc
cmp dword [ebp - 0x6c], edi
je 0x41148d
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x411482
call fcn.0040b13d
mov dword [eax], 9
call fcn.0040b146
mov dword [eax], esi
jmp 0x4114b7
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411477
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x411423
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x411423
push dword [ebp - 0x6c]
call fcn.0040b14f
pop ecx
jmp 0x4114b7
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4114a5
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x4114a5
xor eax, eax
jmp 0x4114bf
call fcn.0040b13d
mov dword [eax], 0x1c
call fcn.0040b146
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4114bf
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0040a50e
add ebp, 0x3a0
leave
ret
Function at 0x4126d0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x42c118], ebx
push esi
push edi
jne 0x412750
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x41278b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x42389c
push edi
call esi
test eax, eax
mov dword [0x42c118], eax
je 0x41278b
push str.GetActiveWindow
push edi
call esi
push 0x423878
push edi
mov dword [0x42c11c], eax
call esi
cmp dword [0x42bc8c], 2
mov dword [0x42c120], eax
jne 0x412750
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x42c128], eax
je 0x412750
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42c124], eax
mov eax, dword [0x42c124]
test eax, eax
je 0x412795
call eax
test eax, eax
je 0x41277c
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x42c128]
test eax, eax
je 0x41277c
test byte [ebp - 8], 1
jne 0x412795
cmp dword [0x42bc98], 4
jb 0x41278f
or byte [ebp + 0x12], 0x20
jmp 0x4127b4
xor eax, eax
jmp 0x4127c4
or byte [ebp + 0x12], 4
jmp 0x4127b4
mov eax, dword [0x42c11c]
test eax, eax
je 0x4127b4
call eax
mov ebx, eax
test ebx, ebx
je 0x4127b4
mov eax, dword [0x42c120]
test eax, eax
je 0x4127b4
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x42c118]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41442f
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x414448
or eax, 0xffffffff
jmp 0x4144a9
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x4144a5
push 0x3d
push esi
call fcn.0040a5cb
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x4144a5
cmp esi, eax
je 0x4144a5
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x42bcac]
sete cl
cmp eax, dword [0x42bcb0]
mov dword [ebp - 8], ecx
jne 0x41448b
mov edi, eax
call fcn.004143ce
mov dword [0x42bcac], eax
cmp eax, ebx
jne 0x4144e4
cmp dword [ebp + 0xc], ebx
je 0x4144ad
cmp dword [0x42bcb4], ebx
je 0x4144ad
call fcn.00413672
test eax, eax
je 0x4144e4
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x4144b6
xor eax, eax
jmp 0x4144a8
push 4
call fcn.004080e4
cmp eax, ebx
pop ecx
mov dword [0x42bcac], eax
je 0x4144a5
mov dword [eax], ebx
cmp dword [0x42bcb4], ebx
jne 0x4144e4
push 4
call fcn.004080e4
cmp eax, ebx
pop ecx
mov dword [0x42bcb4], eax
je 0x4144a5
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x42bcac]
call fcn.00414381
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x414545
cmp dword [esi], ebx
je 0x414545
lea esi, [esi + edi*4]
push dword [esi]
call fcn.004080f6
cmp dword [ebp - 8], ebx
pop ecx
jne 0x414528
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x414586
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x41451f
mov eax, edi
shl eax, 2
push eax
push dword [0x42bcac]
call fcn.0040a646
cmp eax, ebx
pop ecx
pop ecx
je 0x414586
jmp 0x414581
cmp dword [ebp - 8], ebx
jne 0x4145f1
cmp edi, ebx
jge 0x414554
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x42bcac]
call fcn.0040a646
cmp eax, ebx
pop ecx
pop ecx
je 0x4144a5
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x42bcac], eax
cmp dword [ebp + 0xc], ebx
je 0x4145db
push dword [ebp - 4]
call fcn.0040a520
inc eax
inc eax
push eax
call fcn.004080e4
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x4145db
push dword [ebp - 4]
push esi
call fcn.0040fa70
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x4145d4
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.004080f6
pop ecx
cmp dword [ebp - 8], ebx
je 0x4145e9
push dword [ebp - 4]
call fcn.004080f6
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x4144a8
push dword [ebp - 4]
call fcn.004080f6
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x4144b2
Function at 0x414cf0
Capabilities:
Check os version

Disassembly:
sub esp, 0xa4
mov eax, dword [0x428c80]
push ebx
push esi
mov dword [esp + 0xa8], eax
push edi
mov edi, dword [esp + 0xb4]
lea eax, [esp + 0x10]
push eax
mov dword [edi], 0
mov dword [esp + 0x14], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push str.kernel32.dll
mov ebx, eax
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x414eb0
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x414d76
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x414eb0
cmp dword [esp + 0xc], 1
mov esi, 3
je 0x414d7a
mov esi, dword [esp + 0x20]
test ebx, ebx
je 0x414eb0
cmp esi, 3
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
ja case.default.0x414d93
jmp dword [esi*4 + 0x414ecc]
cmp edx, 5
jne 0x414dd1
cmp ecx, 2
jne 0x414e70
mov al, byte [esp + 0xaa]
cmp al, 1
jne 0x414dbe
mov dword [edi], 0xb
jmp 0x414e70
cmp al, 3
jne 0x414e70
mov dword [edi], 0xc
jmp 0x414e70
cmp edx, 6
jne 0x414e70
test ecx, ecx
jne 0x414e70
mov dword [edi], 0xd
jmp 0x414e70
cmp edx, 3
ja 0x414df8
mov dword [edi], 5
cmp edx, 4
jne 0x414e05
mov dword [edi], 6
jmp 0x414e70
cmp edx, 5
jne 0x414e30
test ecx, ecx
jne 0x414e16
mov dword [edi], 7
jmp 0x414e70
cmp ecx, 1
jne 0x414e23
mov dword [edi], 8
jmp 0x414e70
cmp ecx, 2
jne 0x414e70
mov dword [edi], 9
jmp 0x414e70
cmp edx, 6
jne 0x414e70
test ecx, ecx
jne 0x414e70
mov dword [edi], 0xa
jmp 0x414e70
cmp edx, 4
ja 0x414e54
jne 0x414e4c
test ecx, ecx
ja 0x414e54
mov dword [edi], 2
jmp 0x414e70
mov eax, 0xa
cmp eax, ecx
sbb eax, eax
neg eax
add eax, 3
mov dword [edi], eax
jmp 0x414e70
mov dword [edi], 1
jmp 0x414e70
xor ebx, ebx
mov eax, dword [esp + 0xb8]
mov dword [eax + 8], edx
movzx edx, word [esp + 0xa6]
mov dword [eax + 0xc], ecx
movzx ecx, word [esp + 0xa4]
pop edi
mov dword [eax + 4], esi
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], edx
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0xa0]
call fcn.0040a50e
add esp, 0xa4
ret 8
mov ecx, dword [esp + 0xac]
pop edi
pop esi
xor eax, eax
pop ebx
call fcn.0040a50e
add esp, 0xa4
ret 8
Function at 0x417f68
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x128
xor ebx, ebx
push ebx
push esi
mov edi, ecx
call fcn.0040bb80
add esp, 0xc
push 0x104
push dword [edi + 0xc]
lea eax, [esi + 0x22]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [edi + 4]
cmp eax, dword [0x4222a4]
je 0x41806f
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x417fd8
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ebx
jne 0x417fdf
cmp ebx, ebx
jne 0x417fdf
xor eax, eax
jmp 0x418072
mov edi, dword [edi + 0xc]
cmp dword [edi - 0xc], ebx
jne 0x417fec
mov byte [esi + 0x20], bl
jmp 0x418000
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
sete cl
dec cl
and ecx, eax
mov byte [esi + 0x20], cl
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x20]
call fcn.00406ba0
mov ecx, dword [eax]
mov dword [esi], ecx
mov eax, dword [eax + 4]
mov dword [esi + 4], eax
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
call fcn.00406ba0
mov ecx, dword [eax]
mov dword [esi + 0x10], ecx
mov eax, dword [eax + 4]
mov dword [esi + 0x14], eax
push 0xffffffffffffffff
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x20]
call fcn.00406ba0
mov ecx, dword [eax]
mov dword [esi + 8], ecx
mov ecx, dword [eax + 4]
mov dword [esi + 0xc], ecx
mov ecx, dword [esi]
or ecx, dword [esi + 4]
jne 0x41805b
mov ecx, dword [eax]
mov dword [esi], ecx
mov eax, dword [eax + 4]
mov dword [esi + 4], eax
mov eax, dword [esi + 0x10]
or eax, dword [esi + 0x14]
jne 0x41806f
mov eax, dword [esi + 8]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0x14], eax
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x41bb62
Capabilities:
Get disk information

Disassembly:
mov eax, 0x41ef2d
call fcn.0040a5ac
sub esp, 0x150
mov eax, dword [0x428c80]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x154]
push eax
push edi
mov esi, 0x104
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
xor ebx, ebx
cmp eax, ebx
jne 0x41bbaa
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x41bbae
cmp eax, esi
jb 0x41bbb5
xor eax, eax
jmp 0x41bc8a
call fcn.004173c5
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push edi
mov dword [ebp - 4], ebx
call fcn.0041bb20
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathIsUNCA]
test eax, eax
jne 0x41bc7a
push ebx
push ebx
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x15c]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x41bc09
xor esi, esi
jmp 0x41bc7d
test byte [ebp - 0x158], 2
jne 0x41bc19
push edi
call dword [sym.imp.USER32.dll_CharUpperA]
test byte [ebp - 0x158], 4
jne 0x41bc7a
lea eax, [ebp - 0x150]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x41bc7a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x154], ebx
je 0x41bc05
cmp dword [ebp - 0x154], edi
jbe 0x41bc05
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
sub eax, edi
add eax, dword [ebp - 0x154]
cmp eax, esi
jge 0x41bc05
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor esi, esi
inc esi
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401180
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.0040a50e
leave
ret 8

Function at 0x41ccca
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x428c80]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, pe_nt_image_headers32
cmp esi, eax
ja 0x41cd19
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x41cd19
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x41cd25
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [ebp - 4]
pop esi
call fcn.0040a50e
leave
ret 8
Function at 0x41e0a7
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x41e0dc
cmp edi, dword [esi + 0xc]
jge 0x41e0dc
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41e0dc
cmp edi, dword [eax + 8]
jge 0x41e0dc
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x41e0de
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x41e18a
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x41e1be
jmp fcn.00416add
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x41e328
cmp eax, dword [edi + 0xc]
jge 0x41e328
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x41e280
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x41e311
cmp dword [ebp + 0xc], ebx
je 0x41e311
jmp 0x41e2aa
push 0x10
call fcn.0041df73
cmp eax, ebx
je 0x41e296
mov ecx, eax
call fcn.0041e181
mov esi, eax
jmp 0x41e298
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x41e2c1
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x41e2d1
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x41e2e3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00416add
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.0040bb80
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x41e323
cmp ecx, dword [esi + 8]
jge 0x41e323
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x41e329
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8