joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c6cc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x432748]
push edi
jae 0x40c8a1
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x432760]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40c8a1
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40c777
test dl, 2
jne 0x40c777
test dl, 0x48
je 0x40c741
cmp byte [eax + 5], 0xa
je 0x40c741
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c78a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40c772
mov dword [0x42b9e8], ecx
jmp 0x40c8a8
cmp eax, 0x6d
jne 0x40c77e
xor eax, eax
jmp 0x40c8b5
push eax
call fcn.0040dcf4
pop ecx
jmp 0x40c8b2
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40c89c
test eax, eax
je 0x40c7b1
cmp byte [ebx], 0xa
jne 0x40c7b1
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40c7ba
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40c896
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c886
cmp al, 0xd
je 0x40c7ec
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40c878
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40c806
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40c801
add dword [ebp - 8], 2
jmp 0x40c85a
mov dword [ebp - 8], eax
jmp 0x40c874
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x40c82e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c874
cmp dword [ebp - 0x10], 0
je 0x40c874
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40c84f
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c85a
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40c877
cmp ebx, dword [ebp + 0xc]
jne 0x40c85f
cmp byte [ebp - 1], 0xa
jne 0x40c85f
mov byte [ebx], 0xa
jmp 0x40c877
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c8ba
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40c878
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40c7d0
jmp 0x40c896
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40c896
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40c8b5
and dword [0x42b9e8], 0
mov dword [0x42b9e4], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ca24
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x432748]
mov eax, dword [0x42a470]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40cbea
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x432760]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40cbea
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40ca8e
xor eax, eax
jmp 0x40cbfe
test al, 0x20
je 0x40ca9f
push 2
push edi
push edi
push ecx
call fcn.00410729
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40cb74
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40cbbb
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40cb01
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40caf2
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40cad4
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40cb41
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40cb4d
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40cac8
jmp 0x40cb4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40cbe5
cmp dword [ebp + 0x3a4], edi
je 0x40cbbb
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40cbad
mov dword [0x42b9e8], eax
jmp 0x40cbf1
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40cb9f
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40cb4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40cb4f
push dword [ebp + 0x3a4]
call fcn.0040dcf4
pop ecx
jmp 0x40cbfb
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40cbd3
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40ca87
mov dword [0x42b9e4], 0x1c
mov dword [0x42b9e8], edi
jmp 0x40cbfb
sub eax, dword [ebp - 0x7c]
jmp 0x40cbfe
and dword [0x42b9e8], 0
mov dword [0x42b9e4], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00408089
add ebp, 0x39c
leave
ret
Function at 0x40e34e
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00408b80
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e3e9
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x42b9f0]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40e3e9
cmp eax, 1
je 0x40e40a
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e3e9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40e3b6
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40e3e5
xor eax, eax
inc eax
jmp 0x40e429
cmp edi, eax
jae 0x40e3ed
xor eax, eax
jmp 0x40e429
cmp eax, esi
jae 0x40e3f4
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x42b9f0]
jmp 0x40e40d
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e598
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x42a470]
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 + 0x42ab10]
je 0x40e5cd
inc eax
cmp eax, 0x13
jb 0x40e5be
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x42ab10]
jne 0x40e6f3
mov eax, dword [0x42b99c]
cmp eax, 1
je 0x40e6cb
cmp eax, edx
jne 0x40e5fd
cmp dword [0x42a7c0], 1
je 0x40e6cb
cmp ecx, 0xfc
je 0x40e6f3
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 0x40e633
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004079e0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00407b10
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40e667
mov eax, edi
push eax
call fcn.00407b10
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41cd0c
push edi
call fcn.004081c0
add esp, 0x10
push edi
call fcn.00407b10
push dword [esi + 0x42ab14]
mov ebx, eax
call fcn.00407b10
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00408b80
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004079e0
push edi
push ebx
call fcn.004079f0
push 0x41cd08
push ebx
call fcn.004079f0
push dword [esi + 0x42ab14]
push ebx
call fcn.004079f0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00410091
add esp, 0x2c
jmp 0x40e6f3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x42ab14]
push dword [esi]
call fcn.00407b10
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.00408089
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x410091
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x42bc64], ebx
push esi
push edi
jne 0x410111
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x41014c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41d4cc
push edi
call esi
test eax, eax
mov dword [0x42bc64], eax
je 0x41014c
push str.GetActiveWindow
push edi
call esi
push 0x41d4a8
push edi
mov dword [0x42bc68], eax
call esi
cmp dword [0x42b9f0], 2
mov dword [0x42bc6c], eax
jne 0x410111
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x42bc74], eax
je 0x410111
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42bc70], eax
mov eax, dword [0x42bc70]
test eax, eax
je 0x410156
call eax
test eax, eax
je 0x41013d
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x42bc74]
test eax, eax
je 0x41013d
test byte [ebp - 8], 1
jne 0x410156
cmp dword [0x42b9fc], 4
jb 0x410150
or byte [ebp + 0x12], 0x20
jmp 0x410175
xor eax, eax
jmp 0x410185
or byte [ebp + 0x12], 4
jmp 0x410175
mov eax, dword [0x42bc68]
test eax, eax
je 0x410175
call eax
mov ebx, eax
test ebx, ebx
je 0x410175
mov eax, dword [0x42bc6c]
test eax, eax
je 0x410175
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x42bc64]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41027a
Capabilities:
Parse pe header

Disassembly:
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 0x4102a8
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4102af
cmp ebx, dword [eax + 4]
jae 0x4102af
xor eax, eax
jmp 0x41049f
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4102c0
xor eax, eax
inc eax
jmp 0x41049e
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4102d6
cmp ecx, edx
jae 0x41041b
cmp dword [eax + 4], 0
je 0x4102df
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4102c7
cmp dword [ebp + 8], 0
je 0x410301
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41041b
cmp eax, esi
jae 0x41041b
mov eax, dword [0x42bc78]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x410326
cmp dword [esi*4 + 0x42bc80], edi
je 0x41041f
inc esi
cmp esi, eax
jl 0x410314
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41049b
cmp dword [ebp - 8], 0x1000000
jne 0x41049b
test byte [ebp - 0xc], 0xcc
je 0x4103a4
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41049b
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41049b
cmp word [eax + 0x18], 0x10b
jne 0x41049b
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41049b
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4103a4
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4103a4
test byte [ecx + 0x27], 0x80
jne 0x41041b
push 1
push 0x42bcc0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4102b8
mov ecx, dword [0x42bc78]
test ecx, ecx
mov edx, ecx
jle 0x4103d8
lea eax, [ecx*4 + 0x42bc7c]
cmp dword [eax], edi
je 0x4103d8
dec edx
sub eax, 4
test edx, edx
jg 0x4103cc
test edx, edx
jne 0x410409
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4103e5
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4103fd
lea eax, [edx*4 + 0x42bc80]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4103eb
cmp ecx, 0x10
jge 0x410409
inc ecx
mov dword [0x42bc78], ecx
push 0
push 0x42bcc0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4102b8
xor eax, eax
jmp 0x41049e
test esi, esi
jle 0x4102b8
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x42bcc0
call ebx
test eax, eax
jne 0x4102b8
cmp dword [esi*4 + 0x42bc80], edi
je 0x410475
mov eax, dword [0x42bc78]
lea esi, [eax - 1]
test esi, esi
jl 0x410463
cmp dword [esi*4 + 0x42bc80], edi
je 0x41045f
dec esi
jns 0x410453
test esi, esi
jge 0x410473
cmp eax, 0x10
jge 0x41046e
inc eax
mov dword [0x42bc78], eax
lea esi, [eax - 1]
jmp 0x410475
je 0x41048d
xor ecx, ecx
test esi, esi
jl 0x41048d
lea eax, [ecx*4 + 0x42bc80]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41047b
push 0
push 0x42bcc0
call ebx
jmp 0x4102b8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x411d2a
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00408b80
mov eax, dword [0x42a470]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x432748]
mov dword [ebp - 4], eax
jae 0x411e6d
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x432760]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x411e6d
push 1
push esi
push ebx
call fcn.0040c8ba
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x411e77
push 2
push esi
push ebx
call fcn.0040c8ba
add esp, 0xc
cmp eax, 0xffffffff
je 0x411e77
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x411e17
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00407d70
push 0x8000
push ebx
call fcn.00412822
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x411dd6
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.0040ca24
add esp, 0xc
cmp eax, 0xffffffff
je 0x411df4
sub edi, eax
test edi, edi
jg 0x411dcb
jmp 0x411e0a
cmp dword [0x42b9e8], 5
jne 0x411e07
mov dword [0x42b9e4], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.00412822
pop ecx
pop ecx
jmp 0x411e57
jge 0x411e57
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040c8ba
push ebx
call fcn.004106ed
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x411e57
mov dword [0x42b9e4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x42b9e8], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.0040c8ba
add esp, 0xc
mov eax, esi
pop edi
jmp 0x411e7a
mov dword [0x42b9e4], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00408089
leave
ret
Function at 0x412cf2
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 0x412d0b
or eax, 0xffffffff
jmp 0x412d6c
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x412d68
push 0x3d
push esi
call fcn.004131aa
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x412d68
cmp esi, eax
je 0x412d68
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x42ba10]
sete cl
cmp eax, dword [0x42ba14]
mov dword [ebp - 8], ecx
jne 0x412d4e
mov edi, eax
call fcn.00412c91
mov dword [0x42ba10], eax
cmp eax, ebx
jne 0x412da7
cmp dword [ebp + 0xc], ebx
je 0x412d70
cmp dword [0x42ba18], ebx
je 0x412d70
call fcn.00411ec5
test eax, eax
je 0x412da7
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x412d79
xor eax, eax
jmp 0x412d6b
push 4
call fcn.00407c0d
cmp eax, ebx
pop ecx
mov dword [0x42ba10], eax
je 0x412d68
mov dword [eax], ebx
cmp dword [0x42ba18], ebx
jne 0x412da7
push 4
call fcn.00407c0d
cmp eax, ebx
pop ecx
mov dword [0x42ba18], eax
je 0x412d68
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x42ba10]
call fcn.00412c44
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x412e08
cmp dword [esi], ebx
je 0x412e08
lea esi, [esi + edi*4]
push dword [esi]
call fcn.00407ad8
cmp dword [ebp - 8], ebx
pop ecx
jne 0x412deb
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x412e49
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x412de2
mov eax, edi
shl eax, 2
push eax
push dword [0x42ba10]
call fcn.00407878
cmp eax, ebx
pop ecx
pop ecx
je 0x412e49
jmp 0x412e44
cmp dword [ebp - 8], ebx
jne 0x412eb4
cmp edi, ebx
jge 0x412e17
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x42ba10]
call fcn.00407878
cmp eax, ebx
pop ecx
pop ecx
je 0x412d68
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 [0x42ba10], eax
cmp dword [ebp + 0xc], ebx
je 0x412e9e
push dword [ebp - 4]
call fcn.00407b10
inc eax
inc eax
push eax
call fcn.00407c0d
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x412e9e
push dword [ebp - 4]
push esi
call fcn.004079e0
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 0x412e97
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.00407ad8
pop ecx
cmp dword [ebp - 8], ebx
je 0x412eac
push dword [ebp - 4]
call fcn.00407ad8
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x412d6b
push dword [ebp - 4]
call fcn.00407ad8
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x412d75
Function at 0x413211
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x413226
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x413238
xor eax, eax
jmp 0x41326a
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x41325c
cmp esi, eax
jae 0x413234
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x41324e
cmp esi, eax
jae 0x413234
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret

Function at 0x419bfd
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x42a470]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, 0x100
cmp esi, eax
ja 0x419c4c
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x419c4c
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x419c58
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [ebp - 4]
pop esi
call fcn.00408089
leave
ret 8

Function at 0x41acee
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 0x41ad23
cmp edi, dword [esi + 0xc]
jge 0x41ad23
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41ad23
cmp edi, dword [eax + 8]
jge 0x41ad23
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x41ad25
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 0x41add1
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 0x41ae05
jmp fcn.00415809
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret
Function at 0x41ae76
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 0x41af6f
cmp eax, dword [edi + 0xc]
jge 0x41af6f
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x41aec7
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x41af58
cmp dword [ebp + 0xc], ebx
je 0x41af58
jmp 0x41aef1
push 0x10
call fcn.0041abba
cmp eax, ebx
je 0x41aedd
mov ecx, eax
call fcn.0041adc8
mov esi, eax
jmp 0x41aedf
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 0x41af08
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x41af18
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 0x41af2a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00415809
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.00407d70
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 0x41af6a
cmp ecx, dword [esi + 8]
jge 0x41af6a
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x41af70
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8