joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4033a0
Capabilities:
Get file version info

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10c
push ebx
push ebp
push eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
cmp ebp, ebx
jne 0x4033c8
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 8
push edi
push 0xff
lea ecx, [esp + 0x1c]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x14], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
cmp edi, ebx
je 0x40347c
push esi
push edi
mov dword [esp + 0x18], 0xff
call fcn.00410216
mov esi, eax
add esp, 4
test esi, esi
je 0x40347b
mov ecx, dword [esp + 0x10]
push esi
push edi
push ecx
lea edx, [esp + 0x28]
push edx
call sub.VERSION.dll_GetFileVersionInfoA
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0x42c8a8
push esi
call sub.VERSION.dll_VerQueryValueA
mov ebx, eax
test ebx, ebx
je 0x403472
mov eax, dword [esp + 0x18]
movzx edx, word [eax + 0xc]
movzx ecx, word [eax + 0xe]
push edx
movzx edx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
push edx
push eax
push 0xe70a
call fcn.0040de90
mov ecx, dword [esp + 0x138]
add esp, 4
push eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push esi
call fcn.00410228
add esp, 4
pop esi
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x10c
ret 8

Function at 0x4034a0
Capabilities:
Get file version info

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push edi
lea eax, [esp + 0xc]
push eax
xor ebp, ebp
push ebx
mov dword [esp + 0x14], ebp
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
cmp edi, ebp
je 0x40355a
push esi
push edi
mov dword [esp + 0x20], 0xff
call fcn.00410216
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x40354e
mov ecx, dword [esp + 0x10]
push esi
push edi
push ecx
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
push 0x42c8a8
push esi
call sub.VERSION.dll_VerQueryValueA
mov edi, eax
cmp edi, ebp
je 0x403539
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 0xc]
movzx edx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
push edx
movzx edx, word [eax + 0xa]
push ecx
push edx
push 0xe70a
call fcn.0040de90
add esp, 4
push eax
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push esi
call fcn.00410228
add esp, 4
pop esi
mov eax, edi
pop edi
pop ebp
pop ebx
add esp, 8
ret 8
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
add esp, 8
ret 8
pop edi
mov eax, ebp
pop ebp
pop ebx
add esp, 8
ret 8

Function at 0x403710
Capabilities:
Check os version

Disassembly:
mov eax, dword [0x438e38]
push esi
xor esi, esi
test eax, eax
jne 0x403731
push 0x438e38
mov dword [0x438e38], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [0x438e48], 2
jne 0x403748
cmp dword [0x438e3c], 6
mov eax, 1
jae 0x40374a
mov eax, esi
pop esi
ret
Function at 0x407330
Capabilities:
Extract resource via kernel32 functions

Disassembly:
movzx eax, word [esp + 8]
push ebx
mov ebx, dword [esp + 8]
push ebp
push edi
push 2
push eax
push ebx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4073a4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4073a4
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40739d
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x407398
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
pop edi
pop ebp
pop ebx
ret
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
ret
pop edi
mov eax, ebp
pop ebp
pop ebx
ret
Function at 0x40e110
Capabilities:
Query environment variable

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp byte [esi], 0
je 0x40e159
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x40e130
push 7
push 0xa28
call fcn.0040de90
add esp, 4
push eax
push esi
call fcn.00411c30
add esp, 0xc
test eax, eax
je 0x40e160
push esi
call edi
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x40e130
pop edi
xor eax, eax
pop esi
ret 4
mov cx, word [esi + 8]
mov eax, dword [esp + 0xc]
pop edi
mov word [eax], cx
mov byte [eax + 2], 0
mov eax, 1
pop esi
ret 4

Function at 0x40e6a0
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
je 0x40e6b3
mov dword [ebx], 0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40e6c1
mov dword [eax], 0
lea eax, [esp + 0xc]
push eax
push ebp
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
je 0x40e727
push edi
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
push esi
push 0
push ebp
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x40e71f
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x10]
push edx
push 0x42c8a8
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x40e71f
test ebx, ebx
mov ecx, dword [esp + 0xc]
je 0x40e712
mov eax, dword [ecx + 8]
mov dword [ebx], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40e71f
mov ecx, dword [ecx + 0xc]
mov dword [eax], ecx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
add esp, 0xc
ret

Function at 0x40eae0
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
mov eax, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x14]
lea ecx, [esp + 4]
push ecx
push 1
push 0
push edx
push 0x80000002
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], eax
mov byte [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40eb7d
mov eax, dword [esp + 4]
test eax, eax
je 0x40eb8c
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40eb7d
cmp byte [esi], 0
je 0x40eb7d
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40eb42
sub eax, edx
cmp byte [eax + esi - 1], 0x5c
je 0x40eb7d
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40eb57
sub eax, edx
cmp byte [eax + esi - 1], 0x2f
je 0x40eb7d
dec esi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x40eb68
mov ax, word [0x42c8a8]
push edi
mov edi, esi
mov word [edi], ax
pop edi
mov eax, dword [esp + 4]
test eax, eax
je 0x40eb8c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ecx
ret
Function at 0x40eb90
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
xor eax, eax
test esi, esi
je 0x40ecfd
mov byte [esi], al
mov eax, dword [esp + 0x114]
test eax, eax
je 0x40ebbb
mov dword [eax], 0
push ebx
push edi
push str.QuickTime.qts
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov ebx, dword [esp + 0x118]
je 0x40ec1f
push 0x104
lea ecx, [esp + 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x40ec1f
lea eax, [esp + 0xc]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ebf0
sub eax, edx
lea edi, [eax - 0xd]
test edi, edi
jbe 0x40ec1f
lea edx, [edi + 1]
cmp ebx, edx
jbe 0x40ec1f
push edi
lea eax, [esp + 0x10]
push eax
push esi
call fcn.00410d60
add esp, 0xc
mov byte [edi + esi], 0
jmp 0x40eca8
cmp byte [esi], 0
jne 0x40ecad
push ebx
push esi
push str.QTSysDir
push str.SoftwareApple_Computer__Inc.QuickTime
call fcn.0040eae0
mov al, byte [esi]
add esp, 0x10
test al, al
je 0x40ec51
push 0
push esi
call fcn.00411edd
add esp, 8
test eax, eax
je 0x40ec54
mov byte [esi], 0
cmp byte [esi], 0
jne 0x40ecad
push ebx
push esi
push str.QuickTime.qts_folder
push str.SoftwareApple_Computer__Inc.QuickTime
call fcn.0040eae0
mov al, byte [esi]
add esp, 0x10
test al, al
je 0x40ec82
push 0
push esi
call fcn.00411edd
add esp, 8
test eax, eax
je 0x40ec85
mov byte [esi], 0
cmp byte [esi], 0
jne 0x40ecad
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x40eca5
push 0
push esi
call fcn.00411edd
add esp, 8
test eax, eax
je 0x40eca8
mov byte [esi], 0
cmp byte [esi], 0
je 0x40ecf2
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ecb2
sub eax, edx
cmp byte [eax + esi - 1], 0x5c
je 0x40ecf2
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ecc7
sub eax, edx
cmp byte [eax + esi - 1], 0x2f
je 0x40ecf2
mov edi, esi
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40ece0
mov cx, word [0x42c8a8]
mov word [edi], cx
mov cl, byte [esi]
xor eax, eax
test cl, cl
pop edi
setne al
pop ebx
pop esi
add esp, 0x104
ret
Function at 0x40ed10
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push ebp
mov ebp, dword [esp + 0x210]
push esi
mov esi, dword [esp + 0x218]
push esi
push ebp
push str.QTExtDir
push str.SoftwareApple_Computer__Inc.QuickTime
call fcn.0040eae0
mov al, byte [ebp]
add esp, 0x10
test al, al
jne 0x40ee4c
add esi, 0xfffffff6
push esi
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0
lea ecx, [esp + 0x110]
push esi
push ecx
call fcn.0040eb90
mov al, byte [esp + 0x118]
add esp, 0xc
test al, al
je 0x40ee4c
lea eax, [esp + 8]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ed80
sub eax, edx
cmp byte [esp + eax + 7], 0x5c
push edi
je 0x40edc2
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ed98
sub eax, edx
cmp byte [esp + eax + 0xb], 0x2f
je 0x40edc2
lea edi, [esp + 0xc]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40edb0
mov dx, word [0x42c8a8]
mov word [edi], dx
lea eax, [esp + 0x110]
mov edx, ebp
mov ecx, eax
sub edx, ecx
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40edd0
lea esi, [esp + 0x110]
lea eax, [esp + 0xc]
push ebx
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40ee0e
test cl, cl
je 0x40ee0a
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40ee0e
add eax, 2
add esi, 2
test cl, cl
jne 0x40ede6
xor eax, eax
jmp 0x40ee13
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
pop ebx
jne 0x40ee4b
mov edi, ebp
dec edi
jmp 0x40ee20
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40ee20
mov eax, dword [str.QuickTime_]
mov dword [edi], eax
mov ecx, dword [0x42d9bc]
mov dword [edi + 4], ecx
mov dx, word [0x42d9c0]
mov word [edi + 8], dx
mov al, byte [0x42d9c2]
mov byte [edi + 0xa], al
pop edi
mov eax, ebp
pop esi
lea edx, [eax + 1]
pop ebp
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ee53
sub eax, edx
add esp, 0x208
ret
Function at 0x410299
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.00410580
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x410334
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 [0x43af44]
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 0x410334
cmp eax, 1
je 0x410355
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 0x410334
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x410301
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x410330
xor eax, eax
inc eax
jmp 0x410374
cmp edi, eax
jae 0x410338
xor eax, eax
jmp 0x410374
cmp eax, esi
jae 0x41033f
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 [0x43af44]
jmp 0x410358
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 0x411cb2
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x42fa08
call fcn.004129c4
mov edi, 0x94
mov eax, edi
call fcn.00410580
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 [0x43af44], ecx
mov eax, dword [esi + 4]
mov dword [0x43af50], eax
mov edx, dword [esi + 8]
mov dword [0x43af54], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x43af48], esi
cmp ecx, 2
je 0x411d12
or esi, 0x8000
mov dword [0x43af48], esi
shl eax, 8
add eax, edx
mov dword [0x43af4c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x411d4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x411d4d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x411d65
cmp eax, 0x20b
je 0x411d52
mov dword [ebp - 0x1c], esi
jmp 0x411d79
cmp dword [ecx + 0x84], 0xe
jbe 0x411d4d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x411d73
cmp dword [ecx + 0x74], 0xe
jbe 0x411d4d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00413421
pop ecx
test eax, eax
jne 0x411d8d
push 0x1c
call fcn.00411c8e
pop ecx
call fcn.00414c74
test eax, eax
jne 0x411d9e
push 0x10
call fcn.00411c8e
pop ecx
call fcn.00417806
mov dword [ebp - 4], esi
call fcn.00417608
test eax, eax
jge 0x411db7
push 0x1b
call fcn.00411c69
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43c930], eax
call fcn.004174e6
mov dword [0x43af28], eax
call fcn.00417444
test eax, eax
jge 0x411ddd
push 8
call fcn.00411c69
pop ecx
call fcn.00417211
test eax, eax
jge 0x411dee
push 9
call fcn.00411c69
pop ecx
push 1
call fcn.0041282a
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x411e04
push eax
call fcn.00411c69
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004171b4
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x411e25
movzx eax, word [ebp - 0x40]
jmp 0x411e28
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0041f2b7
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x411e46
push edi
call fcn.00412957
call fcn.00412979
jmp 0x411e78
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004129ff
ret

Function at 0x411edd
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x411efd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00413210
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x411f20
test byte [esp + 8], 2
je 0x411f20
call fcn.004131fe
mov dword [eax], 0xd
call fcn.00413207
mov dword [eax], 5
jmp 0x411ef9
xor eax, eax
ret
Function at 0x412894
Capabilities:
Terminate process

Disassembly:
push 8
push 0x42fa50
call fcn.004129c4
push 8
call fcn.004133d6
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x43af84], esi
jne 0x4128c8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x43af80], esi
mov al, byte [ebp + 0x10]
mov byte [0x43af7c], al
cmp dword [ebp + 0xc], edi
jne 0x412912
cmp dword [0x43c928], edi
je 0x412902
mov eax, dword [0x43c924]
sub eax, 4
mov dword [0x43c924], eax
cmp eax, dword [0x43c928]
jb 0x412902
mov eax, dword [eax]
cmp eax, edi
je 0x4128e3
call eax
jmp 0x4128e3
push 0x43709c
mov eax, 0x437094
call fcn.00412812
pop ecx
push 0x4370a8
mov eax, 0x4370a0
call fcn.00412812
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x412943
cmp dword [ebp + 0x10], edi
jne 0x412951
mov dword [0x43af84], esi
push dword [ebp + 8]
call fcn.004127d0
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x412950
push 8
call fcn.00413321
pop ecx
ret
call fcn.004129ff
ret
Function at 0x413fb0
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 0x413fde
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 0x413fe5
cmp ebx, dword [eax + 4]
jae 0x413fe5
xor eax, eax
jmp 0x4141d5
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x413ff6
xor eax, eax
inc eax
jmp 0x4141d4
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41400c
cmp ecx, edx
jae 0x414151
cmp dword [eax + 4], 0
je 0x414015
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x413ffd
cmp dword [ebp + 8], 0
je 0x414037
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x414151
cmp eax, esi
jae 0x414151
mov eax, dword [0x43b0e8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41405c
cmp dword [esi*4 + 0x43b0f0], edi
je 0x414155
inc esi
cmp esi, eax
jl 0x41404a
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4141d1
cmp dword [ebp - 8], 0x1000000
jne 0x4141d1
test byte [ebp - 0xc], 0xcc
je 0x4140da
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4141d1
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4141d1
cmp word [eax + 0x18], 0x10b
jne 0x4141d1
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4141d1
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4140da
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4140da
test byte [ecx + 0x27], 0x80
jne 0x414151
push 1
push 0x43b130
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x413fee
mov ecx, dword [0x43b0e8]
test ecx, ecx
mov edx, ecx
jle 0x41410e
lea eax, [ecx*4 + 0x43b0ec]
cmp dword [eax], edi
je 0x41410e
dec edx
sub eax, 4
test edx, edx
jg 0x414102
test edx, edx
jne 0x41413f
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41411b
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x414133
lea eax, [edx*4 + 0x43b0f0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x414121
cmp ecx, 0x10
jge 0x41413f
inc ecx
mov dword [0x43b0e8], ecx
push 0
push 0x43b130
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x413fee
xor eax, eax
jmp 0x4141d4
test esi, esi
jle 0x413fee
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x43b130
call ebx
test eax, eax
jne 0x413fee
cmp dword [esi*4 + 0x43b0f0], edi
je 0x4141ab
mov eax, dword [0x43b0e8]
lea esi, [eax - 1]
test esi, esi
jl 0x414199
cmp dword [esi*4 + 0x43b0f0], edi
je 0x414195
dec esi
jns 0x414189
test esi, esi
jge 0x4141a9
cmp eax, 0x10
jge 0x4141a4
inc eax
mov dword [0x43b0e8], eax
lea esi, [eax - 1]
jmp 0x4141ab
je 0x4141c3
xor ecx, ecx
test esi, esi
jl 0x4141c3
lea eax, [ecx*4 + 0x43b0f0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4141b1
push 0
push 0x43b130
call ebx
jmp 0x413fee
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x415dd2
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x437d80]
xor ecx, ecx
xor eax, ebp
cmp dword [ebp + 0x3b4], ecx
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
jne 0x415e0e
xor eax, eax
jmp 0x415f78
mov eax, dword [ebp + 0x3ac]
push ebx
mov ebx, dword [ebp + 0x3ac]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x43b5a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x415e4c
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.0041b5e9
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x415ee6
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x415f49
jmp 0x415e70
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x415eab
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x415e9c
inc dword [ebp - 0x78]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x6c]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x6c]
cmp dword [ebp - 0x6c], 0x400
jl 0x415e7c
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415f0a
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x415f13
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x415e6e
jmp 0x415f13
push ecx
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415f0a
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x415f13
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x415f73
cmp dword [ebp - 0x68], eax
je 0x415f46
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x415f3b
call fcn.004131fe
mov dword [eax], 9
call fcn.00413207
mov dword [eax], esi
jmp 0x415f6e
push dword [ebp - 0x68]
call fcn.00413210
pop ecx
jmp 0x415f6e
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x415f5b
cmp byte [edi], 0x1a
jne 0x415f5b
xor eax, eax
jmp 0x415f76
call fcn.004131fe
mov dword [eax], 0x1c
call fcn.00413207
and dword [eax], 0
or eax, 0xffffffff
jmp 0x415f76
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.0041229e
add ebp, 0x3a4
leave
ret