joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405870
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x24
push esi
xor esi, esi
push edi
push str.advapi32.dll
mov dword [esp + 0x1c], esi
mov byte [esp + 0x28], 0
mov byte [esp + 0x29], 0
mov byte [esp + 0x2a], 0
mov byte [esp + 0x2b], 0
mov byte [esp + 0x2c], 0
mov byte [esp + 0x2d], 5
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, esi
je 0x4059f5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
push ebp
push str.AllocateAndInitializeSid
push edi
call esi
push 0x416ca0
push edi
mov ebp, eax
call esi
push str.GetTokenInformation
push edi
mov dword [esp + 0x2c], eax
call esi
push str.EqualSid
push edi
mov ebx, eax
call esi
push str.FreeSid
push edi
mov dword [esp + 0x24], eax
call esi
test ebp, ebp
mov dword [esp + 0x28], eax
je 0x4059e2
mov esi, dword [esp + 0x24]
test esi, esi
je 0x4059e2
test ebx, ebx
je 0x4059e2
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4059e2
test eax, eax
je 0x4059e2
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [esp + 0x54]
push ecx
call ebp
lea edx, [esp + 0x14]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 2
push ecx
call ebx
mov edx, dword [esp + 0x10]
push edx
call fcn.00408d52
mov esi, eax
add esp, 4
test esi, esi
je 0x4059ce
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push ecx
push esi
push 2
push edx
call ebx
mov eax, dword [esi]
xor ebx, ebx
test eax, eax
jbe 0x4059c5
lea ebp, [esi + 4]
nop
mov eax, dword [ebp]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [esp + 0x24]
test eax, eax
jne 0x4059bd
mov eax, dword [esi]
inc ebx
add ebp, 8
cmp ebx, eax
jb 0x4059a0
jmp 0x4059c5
mov dword [esp + 0x20], 1
push esi
call fcn.004089b2
add esp, 4
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push eax
call dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x20]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x24
ret
pop edi
mov eax, esi
pop esi
add esp, 0x24
ret
Function at 0x406060
Capabilities:
Enumerate network shares

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x190c
call fcn.00409890
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x18], ebx
mov ecx, 0x63f
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x10]
push eax
push ecx
push 2
push ebx
push 2
mov dword [esp + 0x24], ebx
call sub.MPR.dll_WNetOpenEnumA
test eax, eax
je 0x4060ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], 0x1900
call sub.MPR.dll_WNetEnumResourceA
mov esi, eax
cmp esi, ebx
jne 0x4061a4
mov ebx, dword [ebp + 0x10]
mov eax, dword [esp + 0xc]
xor edi, edi
test eax, eax
jbe 0x406171
lea esi, [esp + 0x24]
mov ecx, dword [esi - 4]
test ecx, ecx
je 0x40610e
cmp ecx, 1
jbe 0x406107
cmp ecx, 3
jbe 0x40610e
mov edx, 1
jmp 0x406110
xor edx, edx
mov eax, dword [esi]
and eax, 2
je 0x406134
test edx, edx
je 0x406134
mov eax, dword [ebp + 0xc]
push ebx
push eax
lea ecx, [esi - 0xc]
push ecx
call fcn.00406060
mov al, byte [ebx]
add esp, 0xc
test al, al
jne 0x406171
jmp 0x406151
test eax, eax
je 0x406151
cmp ecx, 2
jne 0x406151
mov edx, dword [ebp + 0xc]
mov eax, dword [esi + 8]
push edx
push eax
call fcn.004127e4
add esp, 8
test eax, eax
je 0x40615f
mov eax, dword [esp + 0xc]
inc edi
add esi, 0x20
cmp edi, eax
jb 0x4060f6
jmp 0x406171
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x14]
mov edx, ebx
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x406167
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], 0x1900
call sub.MPR.dll_WNetEnumResourceA
mov esi, eax
test esi, esi
je 0x4060e4
cmp esi, 0x103
jne 0x4061ae
xor esi, esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4061bc
push eax
call sub.MPR.dll_WNetCloseEnum
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408240
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x40
push ebx
mov ebx, dword [esp + 0x48]
push edi
xor eax, eax
test ebx, ebx
mov byte [esp + 8], 0
mov ecx, 0xf
lea edi, [esp + 9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x408395
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40839b
push esi
lea esi, [ebx + 0x135]
mov ecx, 0x41
mov edi, esi
rep stosd dword es:[edi], eax
push 0x104
push esi
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push str.TEMP
call edi
test eax, eax
jle 0x4082d3
cmp eax, 0x104
jae 0x4082d3
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4082a6
sub eax, edx
cmp byte [eax + ebx + 0x134], 0x5c
je 0x408320
mov edi, esi
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4082c0
mov ax, word [0x416464]
mov word [edi], ax
jmp 0x408320
push 0x104
push esi
push 0x416460
call edi
test eax, eax
jle 0x40831a
cmp eax, 0x104
jae 0x40831a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4082f0
sub eax, edx
cmp byte [eax + ebx + 0x134], 0x5c
je 0x408320
mov edi, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408306
mov cx, word [0x416464]
mov word [edi], cx
jmp 0x408320
mov dword [esi], 0x5c3a43
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408325
sub eax, edx
mov edx, 0x104
sub edx, eax
push edx
push str.KASetup.log
push esi
call fcn.00409430
push 0x417a68
push esi
call fcn.004090d8
mov esi, eax
add esp, 0x14
test esi, esi
je 0x408394
lea eax, [esp + 0x50]
push eax
call fcn.0040a65e
lea ecx, [esp + 0x54]
push ecx
call fcn.0040a4de
push eax
push str._H:_M:_S__b__d__Y
lea edx, [esp + 0x1c]
push 0x40
push edx
call fcn.0040a4c3
lea eax, [esp + 0x24]
push eax
push str.Installation_start_time:__s_n
push esi
call fcn.00409be5
push esi
call fcn.00408db0
add esp, 0x28
pop esi
pop edi
pop ebx
add esp, 0x40
ret
push 0x105
push eax
add ebx, 0x135
push ebx
call fcn.004090f0
add esp, 0xc
pop edi
pop ebx
add esp, 0x40
ret

Function at 0x409332
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x40934f
call fcn.0040968e
mov dword [eax], 0x16
xor eax, eax
jmp 0x4093b9
push esi
push 0x8c
push 1
call fcn.0040d9f2
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4093a4
push esi
call fcn.0040d3de
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x409382
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x40929d
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4093b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.004089b2
test ebx, ebx
pop ecx
je 0x4093b6
push ebx
call fcn.004096a0
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40a6e0
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4184a8
call fcn.0040b5c8
mov edi, 0x94
mov eax, edi
call fcn.00409890
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 [0x41cc48], ecx
mov eax, dword [esi + 4]
mov dword [0x41cc54], eax
mov edx, dword [esi + 8]
mov dword [0x41cc58], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41cc4c], esi
cmp ecx, 2
je 0x40a740
or esi, 0x8000
mov dword [0x41cc4c], esi
shl eax, 8
add eax, edx
mov dword [0x41cc50], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40a77b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a77b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40a793
cmp eax, 0x20b
je 0x40a780
mov dword [ebp - 0x1c], esi
jmp 0x40a7a7
cmp dword [ecx + 0x84], 0xe
jbe 0x40a77b
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40a7a1
cmp dword [ecx + 0x74], 0xe
jbe 0x40a77b
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040a8cf
pop ecx
test eax, eax
jne 0x40a7bb
push 0x1c
call fcn.0040a6bc
pop ecx
call fcn.0040d5d8
test eax, eax
jne 0x40a7cc
push 0x10
call fcn.0040a6bc
pop ecx
call fcn.0040ff9c
mov dword [ebp - 4], esi
call fcn.0040c589
test eax, eax
jge 0x40a7e5
push 0x1b
call fcn.0040a697
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41e348], eax
call fcn.0040fe7a
mov dword [0x41cacc], eax
call fcn.0040fdd8
test eax, eax
jge 0x40a80b
push 8
call fcn.0040a697
pop ecx
call fcn.0040fba5
test eax, eax
jge 0x40a81c
push 9
call fcn.0040a697
pop ecx
push 1
call fcn.0040d721
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40a832
push eax
call fcn.0040a697
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040fb48
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40a853
movzx eax, word [ebp - 0x40]
jmp 0x40a856
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00403590
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40a874
push edi
call fcn.0040d84e
call fcn.0040d870
jmp 0x40a8a6
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040b603
ret
Function at 0x40b836
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x41be40]
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 0x40b867
xor eax, eax
jmp 0x40b9f0
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 + 0x41d200]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40b8a3
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00410784
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b97e
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40b9bc
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 0x40b907
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40b8f8
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 0x40b8d8
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 0x40b947
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40b950
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40b8c9
jmp 0x40b952
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40b9eb
cmp dword [ebp - 0x6c], edi
je 0x40b9bc
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40b9b1
call fcn.0040968e
mov dword [eax], 9
call fcn.00409697
mov dword [eax], esi
jmp 0x40b9e6
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 0x40b9a6
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40b952
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40b952
push dword [ebp - 0x6c]
call fcn.004096a0
pop ecx
jmp 0x40b9e6
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40b9d4
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40b9d4
xor eax, eax
jmp 0x40b9ee
call fcn.0040968e
mov dword [eax], 0x1c
call fcn.00409697
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40b9ee
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00410838
add ebp, 0x3a0
leave
ret
Function at 0x40c19f
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 0x40c373
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x41d200]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40c373
test cl, 0x48
je 0x40c20a
cmp byte [eax + 5], 0xa
je 0x40c20a
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 0x40c25c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40c244
call fcn.0040968e
mov dword [eax], 9
call fcn.00409697
mov dword [eax], esi
jmp 0x40c254
cmp eax, 0x6d
je 0x40c373
push eax
call fcn.004096a0
pop ecx
or eax, 0xffffffff
jmp 0x40c375
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40c36e
test eax, eax
je 0x40c283
cmp byte [ebx], 0xa
jne 0x40c283
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40c28c
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 0x40c368
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c358
cmp al, 0xd
je 0x40c2be
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40c34a
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40c2d8
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40c2d3
add dword [ebp + 0x10], 2
jmp 0x40c32c
mov dword [ebp + 0x10], eax
jmp 0x40c346
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 0x40c300
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c346
cmp dword [ebp - 0xc], 0
je 0x40c346
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40c321
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c32c
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40c349
cmp ebx, dword [ebp + 0xc]
jne 0x40c331
cmp byte [ebp - 1], 0xa
jne 0x40c331
mov byte [ebx], 0xa
jmp 0x40c349
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c787
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40c34a
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40c2a2
jmp 0x40c368
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40c368
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 0x40c375
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d78b
Capabilities:
Terminate process

Disassembly:
push 8
push 0x418618
call fcn.0040b5c8
push 8
call fcn.0040aa73
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41cc88], esi
jne 0x40d7bf
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41cc84], esi
mov al, byte [ebp + 0x10]
mov byte [0x41cc80], al
cmp dword [ebp + 0xc], edi
jne 0x40d809
cmp dword [0x41d1e8], edi
je 0x40d7f9
mov eax, dword [0x41d1e4]
sub eax, 4
mov dword [0x41d1e4], eax
cmp eax, dword [0x41d1e8]
jb 0x40d7f9
mov eax, dword [eax]
cmp eax, edi
je 0x40d7da
call eax
jmp 0x40d7da
push 0x41b028
mov eax, 0x41b020
call fcn.0040d709
pop ecx
push 0x41b030
mov eax, 0x41b02c
call fcn.0040d709
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40d83a
cmp dword [ebp + 0x10], edi
jne 0x40d848
mov dword [0x41cc88], esi
push dword [ebp + 8]
call fcn.0040d6c7
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40d847
push 8
call fcn.0040a9be
pop ecx
ret
call fcn.0040b603
ret

Function at 0x40f73e
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.00409890
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40f7d9
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 [0x41cc48]
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 0x40f7d9
cmp eax, 1
je 0x40f7fa
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 0x40f7d9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40f7a6
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40f7d5
xor eax, eax
inc eax
jmp 0x40f819
cmp edi, eax
jae 0x40f7dd
xor eax, eax
jmp 0x40f819
cmp eax, esi
jae 0x40f7e4
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 [0x41cc48]
jmp 0x40f7fd
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 0x40f998
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41be40]
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 + 0x41bd90]
je 0x40f9cd
inc eax
cmp eax, 0x13
jb 0x40f9be
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41bd90]
jne 0x40faf3
mov eax, dword [0x41cad4]
cmp eax, 1
je 0x40facb
cmp eax, edx
jne 0x40f9fd
cmp dword [0x41b6d4], 1
je 0x40facb
cmp ecx, 0xfc
je 0x40faf3
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 0x40fa33
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ef80
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040e840
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40fa67
mov eax, edi
push eax
call fcn.0040e840
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x418c60
push edi
call fcn.004090f0
add esp, 0x10
push edi
call fcn.0040e840
push dword [esi + 0x41bd94]
mov ebx, eax
call fcn.0040e840
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00409890
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ef80
push edi
push ebx
call fcn.0040ef90
push 0x418c40
push ebx
call fcn.0040ef90
push dword [esi + 0x41bd94]
push ebx
call fcn.0040ef90
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00412339
add esp, 0x2c
jmp 0x40faf3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41bd94]
push dword [esi]
call fcn.0040e840
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.00410838
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4104ed
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 0x41051b
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 0x410522
cmp ebx, dword [eax + 4]
jae 0x410522
xor eax, eax
jmp 0x410712
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x410533
xor eax, eax
inc eax
jmp 0x410711
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x410549
cmp ecx, edx
jae 0x41068e
cmp dword [eax + 4], 0
je 0x410552
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x41053a
cmp dword [ebp + 8], 0
je 0x410574
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41068e
cmp eax, esi
jae 0x41068e
mov eax, dword [0x41ce98]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x410599
cmp dword [esi*4 + 0x41cea0], edi
je 0x410692
inc esi
cmp esi, eax
jl 0x410587
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41070e
cmp dword [ebp - 8], 0x1000000
jne 0x41070e
test byte [ebp - 0xc], 0xcc
je 0x410617
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41070e
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41070e
cmp word [eax + 0x18], 0x10b
jne 0x41070e
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41070e
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x410617
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x410617
test byte [ecx + 0x27], 0x80
jne 0x41068e
push 1
push 0x41cee0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41052b
mov ecx, dword [0x41ce98]
test ecx, ecx
mov edx, ecx
jle 0x41064b
lea eax, [ecx*4 + 0x41ce9c]
cmp dword [eax], edi
je 0x41064b
dec edx
sub eax, 4
test edx, edx
jg 0x41063f
test edx, edx
jne 0x41067c
push 0xf
pop ebx
cmp ecx, ebx
jg 0x410658
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x410670
lea eax, [edx*4 + 0x41cea0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41065e
cmp ecx, 0x10
jge 0x41067c
inc ecx
mov dword [0x41ce98], ecx
push 0
push 0x41cee0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41052b
xor eax, eax
jmp 0x410711
test esi, esi
jle 0x41052b
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41cee0
call ebx
test eax, eax
jne 0x41052b
cmp dword [esi*4 + 0x41cea0], edi
je 0x4106e8
mov eax, dword [0x41ce98]
lea esi, [eax - 1]
test esi, esi
jl 0x4106d6
cmp dword [esi*4 + 0x41cea0], edi
je 0x4106d2
dec esi
jns 0x4106c6
test esi, esi
jge 0x4106e6
cmp eax, 0x10
jge 0x4106e1
inc eax
mov dword [0x41ce98], eax
lea esi, [eax - 1]
jmp 0x4106e8
je 0x410700
xor ecx, ecx
test esi, esi
jl 0x410700
lea eax, [ecx*4 + 0x41cea0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4106ee
push 0
push 0x41cee0
call ebx
jmp 0x41052b
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret