joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4aea9a
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4aead2
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004acb15
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004acaed
jmp 0x4aeade
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4b0294
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4b02d6
call fcn.004b66fc
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4b02d6
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4b02cd
xor eax, eax
jmp 0x4b02de
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004b02e4
pop edi
pop esi
pop ebx
ret 4

Function at 0x4b6c2c
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4b6c5a
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4b6c78
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004b6b92
jmp 0x4b6c78
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4b6c78
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004b6b92
test edi, edi
mov eax, edi
jne 0x4b6c62
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401af0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401b09
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x401b1d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401b3e
cmp esi, eax
jae 0x401b17
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401b30
cmp esi, eax
jae 0x401b17
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x404108
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x40415b
call fcn.00433113
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x40415b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x404151
xor eax, eax
jmp 0x404270
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x40418a
mov eax, dword [edi]
push ebx
push dword [ebp - 4]
mov ecx, edi
push dword [ebp + 8]
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x40418a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
test eax, eax
je 0x40426d
mov edi, dword [eax + 0x40]
and dword [ebp + 0x10], 0
xor eax, eax
cmp edi, eax
mov dword [ebp + 0xc], edi
mov dword [ebp - 8], edi
je 0x4041b9
mov ecx, dword [edi]
mov dword [ebp + 0xc], ecx
mov ecx, dword [edi + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x10], ecx
cmp dword [ebx + 8], eax
mov dword [ebp - 4], eax
jbe 0x40426d
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4041f7
mov ecx, dword [ecx + 4]
mov edx, dword [ebx + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x4041f7
test edi, edi
mov dword [ebp - 8], edi
je 0x4041f1
mov eax, dword [edi]
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
jmp 0x40425d
and dword [ebp + 0x10], 0
jmp 0x40425d
mov ecx, dword [ebx + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x40425d
push 0xc
call fcn.00419b7d
mov esi, eax
test esi, esi
pop ecx
je 0x40423c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0xc]
mov dword [esi], eax
jmp 0x40423e
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x404258
push dword [ebp - 8]
call fcn.00419356
jmp 0x40425d
call fcn.0041932d
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [ebx + 8]
mov dword [ebp - 4], eax
jb 0x4041c5
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40ceba
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x442d80
call fcn.004107a0
mov edi, 0x94
mov eax, edi
call fcn.0040c890
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4502dc], ecx
mov eax, dword [esi + 4]
mov dword [0x4502e8], eax
mov edx, dword [esi + 8]
mov dword [0x4502ec], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4502e0], esi
cmp ecx, 2
je 0x40cf1a
or esi, 0x8000
mov dword [0x4502e0], esi
shl eax, 8
add eax, edx
mov dword [0x4502e4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40cf55
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40cf55
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40cf6d
cmp eax, 0x20b
je 0x40cf5a
mov dword [ebp - 0x1c], esi
jmp 0x40cf81
cmp dword [ecx + 0x84], 0xe
jbe 0x40cf55
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40cf7b
cmp dword [ecx + 0x74], 0xe
jbe 0x40cf55
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040fc29
pop ecx
test eax, eax
jne 0x40cf95
push 0x1c
call fcn.0040ce96
pop ecx
call fcn.0040f9ed
test eax, eax
jne 0x40cfa6
push 0x10
call fcn.0040ce96
pop ecx
call fcn.00411698
mov dword [ebp - 4], esi
call fcn.0041149a
test eax, eax
jge 0x40cfbf
push 0x1b
call fcn.0040ce71
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x451b30], eax
call fcn.00411378
mov dword [0x4502cc], eax
call fcn.004112d6
test eax, eax
jge 0x40cfe5
push 8
call fcn.0040ce71
pop ecx
call fcn.004110a3
test eax, eax
jge 0x40cff6
push 9
call fcn.0040ce71
pop ecx
call fcn.0040d915
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x40d009
push eax
call fcn.0040ce71
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041103a
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x40d02a
movzx eax, word [ebp - 0x34]
jmp 0x40d02d
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00417b62
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40d04b
push edi
call fcn.0040da4d
call fcn.0040da6f
jmp 0x40d07d
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004107db
ret
Function at 0x414bc4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4506b4], ebx
push esi
push edi
jne 0x414c44
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x414c7f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x443b94
push edi
call esi
test eax, eax
mov dword [0x4506b4], eax
je 0x414c7f
push 0x443b84
push edi
call esi
push 0x443b70
push edi
mov dword [0x4506b8], eax
call esi
cmp dword [0x4502dc], 2
mov dword [0x4506bc], eax
jne 0x414c44
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4506c4], eax
je 0x414c44
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4506c0], eax
mov eax, dword [0x4506c0]
test eax, eax
je 0x414c89
call eax
test eax, eax
je 0x414c70
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4506c4]
test eax, eax
je 0x414c70
test byte [ebp - 8], 1
jne 0x414c89
cmp dword [0x4502e8], 4
jb 0x414c83
or byte [ebp + 0x12], 0x20
jmp 0x414ca8
xor eax, eax
jmp 0x414cb8
or byte [ebp + 0x12], 4
jmp 0x414ca8
mov eax, dword [0x4506b8]
test eax, eax
je 0x414ca8
call eax
mov ebx, eax
test ebx, ebx
je 0x414ca8
mov eax, dword [0x4506bc]
test eax, eax
je 0x414ca8
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4506b4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x414f45
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x44d470]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x414f6e
xor eax, eax
jmp 0x4150dc
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4517c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x414fa1
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.004167dd
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x415073
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x4150ae
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x414ffc
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x414fed
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x414fd0
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41503c
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x415045
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x414fc1
jmp 0x415047
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x4150d7
cmp dword [ebp - 8], edi
je 0x4150ae
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x4150a0
call fcn.0040df02
mov dword [eax], 9
call fcn.0040df0b
mov dword [eax], esi
jmp 0x4150a9
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415095
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x415047
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x415047
push dword [ebp - 8]
call fcn.0040df14
pop ecx
or eax, 0xffffffff
jmp 0x4150da
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4150c3
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4150c3
xor eax, eax
jmp 0x4150da
call fcn.0040df02
mov dword [eax], 0x1c
call fcn.0040df0b
mov dword [eax], edi
jmp 0x4150a9
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0040d1cc
leave
ret
Function at 0x415623
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040c890
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4156b8
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x4502dc]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x4156b8
cmp eax, 1
je 0x4156d0
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4156b8
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x41568d
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x4156b4
xor eax, eax
inc eax
jmp 0x4156ec
cmp esi, ebx
jae 0x4156bc
xor eax, eax
jmp 0x4156ec
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4502dc]
jmp 0x4156d2
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x416a64
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 0x416c2a
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4517c0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x416c2a
test cl, 0x48
je 0x416aca
mov al, byte [eax + 5]
cmp al, 0xa
je 0x416aca
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 0x416b1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x416b04
call fcn.0040df02
mov dword [eax], 9
call fcn.0040df0b
mov dword [eax], esi
jmp 0x416b14
cmp eax, 0x6d
je 0x416c2a
push eax
call fcn.0040df14
pop ecx
or eax, 0xffffffff
jmp 0x416c2c
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x416c25
test edx, edx
je 0x416b3f
cmp byte [ebx], 0xa
jne 0x416b3f
or al, 4
jmp 0x416b41
and al, 0xfb
mov byte [ecx], al
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 0x416c1f
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x416c0f
cmp al, 0xd
je 0x416b75
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x416c01
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x416b8f
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x416b8a
add dword [ebp + 0x10], 2
jmp 0x416be3
mov dword [ebp + 0x10], eax
jmp 0x416bfd
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 0x416bb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x416bfd
cmp dword [ebp - 0xc], 0
je 0x416bfd
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x416bd8
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x416be3
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x416c00
cmp ebx, dword [ebp + 0xc]
jne 0x416be8
cmp byte [ebp - 1], 0xa
jne 0x416be8
mov byte [ebx], 0xa
jmp 0x416c00
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414e26
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x416c01
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x416b59
jmp 0x416c1f
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x416c1f
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x416c2c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4176c5
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x417730
push 0x3d
push dword [ebp + 8]
call fcn.0040d67b
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x417730
cmp dword [ebp + 8], esi
je 0x417730
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x4502fc]
cmp eax, dword [0x450300]
jne 0x417716
mov edi, eax
call fcn.00417664
mov dword [0x4502fc], eax
cmp eax, ebx
jne 0x41776f
cmp dword [ebp + 0xc], ebx
je 0x417738
cmp dword [0x450304], ebx
je 0x417738
call fcn.00416d7c
test eax, eax
je 0x41776f
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x417873
push 4
call fcn.0040c80d
cmp eax, ebx
pop ecx
mov dword [0x4502fc], eax
je 0x417730
mov dword [eax], ebx
cmp dword [0x450304], ebx
jne 0x41776f
push 4
call fcn.0040c80d
cmp eax, ebx
pop ecx
mov dword [0x450304], eax
je 0x417730
mov dword [eax], ebx
mov ebx, dword [0x4502fc]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.00417617
mov edi, eax
test edi, edi
pop ecx
jl 0x4177c8
cmp dword [ebx], 0
je 0x4177c8
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0040c81f
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x4177b0
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x4177fe
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x4177a7
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0040dd3f
test eax, eax
pop ecx
pop ecx
je 0x4177fe
jmp 0x4177f9
cmp dword [ebp - 4], 0
jne 0x41786c
test edi, edi
jge 0x4177d8
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0040dd3f
test eax, eax
pop ecx
pop ecx
je 0x417730
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x4502fc], eax
cmp dword [ebp + 0xc], 0
je 0x417855
push dword [ebp + 8]
call fcn.0040d5f0
inc eax
inc eax
push eax
call fcn.0040c80d
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x417855
push dword [ebp + 8]
push esi
call fcn.00412e00
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
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 0x41784e
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0040c81f
pop ecx
cmp dword [ebp - 4], 0
je 0x417864
push dword [ebp + 8]
call fcn.0040c81f
pop ecx
mov eax, dword [ebp - 8]
jmp 0x417733
push esi
call fcn.0040c81f
pop ecx
xor eax, eax
jmp 0x417733
Function at 0x417e6a
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x43afbf
call fcn.0040d17c
sub esp, 0x9c
mov eax, dword [0x44d470]
xor eax, dword [ebp + 4]
push ebx
push esi
push edi
push dword [ebp + 0x1c]
mov esi, ecx
xor ebx, ebx
push ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esi
call fcn.0041f099
lea ecx, [esi + 0x78]
mov dword [ebp - 4], ebx
mov dword [esi], vtable.CFileDialog.0
call fcn.00401f40
cmp dword [ebp + 0x20], ebx
mov byte [ebp - 4], 1
jne 0x417efb
mov edi, 0x94
push edi
lea eax, [ebp - 0xa8]
push ebx
push eax
call fcn.0040d110
add esp, 0xc
lea eax, [ebp - 0xa8]
push eax
mov dword [ebp - 0xa8], edi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x98], 2
jne 0x417ef4
cmp dword [ebp - 0xa4], 5
mov dword [ebp + 0x20], 0x58
jae 0x417efb
mov dword [ebp + 0x20], 0x4c
push dword [ebp + 0x20]
call fcn.0040c80d
cmp eax, ebx
pop ecx
mov dword [esi + 0x70], eax
jne 0x417f10
call fcn.00417c04
push dword [ebp + 0x20]
push ebx
push dword [esi + 0x70]
call fcn.0040d110
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x20]
mov dword [esi + 0x74], eax
add esp, 0xc
neg eax
sbb eax, eax
add eax, 0x7005
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x70]
mov dword [esi + 0x1c0], ebx
lea ecx, [esi + 0x7c]
mov byte [ecx], bl
lea edi, [esi + 0xbc]
mov byte [edi], bl
mov dword [eax], edx
mov eax, dword [esi + 0x70]
mov edx, dword [ebp + 0xc]
mov dword [eax + 0x1c], edi
mov eax, dword [esi + 0x70]
mov dword [eax + 0x20], 0x104
mov eax, dword [esi + 0x70]
mov dword [eax + 0x3c], edx
mov eax, dword [esi + 0x70]
mov edx, dword [ebp + 0x14]
mov dword [eax + 0x24], ecx
mov eax, dword [esi + 0x70]
push 0x40
pop ecx
mov dword [eax + 0x28], ecx
mov eax, dword [esi + 0x70]
or edx, 0x80020
or dword [eax + 0x34], edx
test byte [ebp + 0x14], cl
je 0x417f8f
mov eax, dword [esi + 0x70]
and byte [eax + 0x36], 0x7f
call fcn.00433113
cmp dword [ebp + 0x10], ebx
mov eax, dword [eax + 0xc]
mov ecx, dword [esi + 0x70]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x70]
mov dword [eax + 0x44], 0x418610
je 0x417fbb
push 0x104
push dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp + 0x18], ebx
je 0x417ff1
push dword [ebp + 0x18]
lea edi, [esi + 0x78]
mov ecx, edi
call fcn.004022f0
push ebx
mov ecx, edi
call fcn.00401f60
jmp 0x417fda
mov byte [eax], bl
inc eax
push 0x7c
push eax
call fcn.0040d67b
cmp eax, ebx
pop ecx
pop ecx
jne 0x417fd7
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x78]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
xor ecx, dword [ebp + 4]
pop edi
mov eax, esi
pop esi
pop ebx
call fcn.0040d1cc
leave
ret 0x1c