joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4138c9
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 4
mov eax, 0x435b66
call fcn.00425691
mov edi, ecx
mov ebx, dword [ebp + 0xc]
and dword [ebp - 4], 0
and dword [ebp - 0x10], 0
mov esi, ebx
call fcn.00402f14
and dword [ebp - 4], 0
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0
mov dword [ebp - 0x10], 1
je 0x413986
mov esi, dword [ebx]
call fcn.0040718e
test al, al
je 0x413986
mov eax, dword [ebx]
push edi
push dword [ebp + 0x10]
push dword [eax]
call fcn.00423b80
mov eax, dword [ebx]
add esp, 0xc
lea ecx, [ebp + 0x10]
push ecx
mov dword [ebp + 0x10], edi
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push 0
push 1
push 0
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x413943
mov edi, dword [ebp + 0x10]
jmp 0x41397f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x41397d
mov edi, dword [ebp + 0x10]
mov esi, dword [ebx]
call fcn.0040718e
test al, al
je 0x41397d
mov eax, dword [ebx]
mov eax, dword [eax]
lea ecx, [ebp + 0x10]
push ecx
push eax
mov eax, dword [ebp + 8]
push 0
push 1
push 0
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x413986
xor edi, edi
mov esi, dword [ebx]
call fcn.0040718e
mov eax, ebx
call fcn.00425769
ret 0xc
Function at 0x414c54
Capabilities:
Create process on windows

Disassembly:
push 0x54
mov eax, 0x43638f
call fcn.00425691
xor edi, edi
mov dword [ebp - 4], edi
push 0x44
pop esi
push esi
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.00423b00
xor eax, eax
push 0x10
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x1c]
push edi
push eax
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x34], 1
call fcn.00423b00
add esp, 0x18
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x60]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
lea esi, [ebp + 8]
call fcn.0040a005
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x414cc4
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x18]
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004167f9
call fcn.00425769
ret

Function at 0x416921
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov ebx, 0xf0000000
push ebx
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
push edi
call esi
test eax, eax
je 0x416949
cmp dword [edi], 0
jne 0x41695b
push ebx
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider__Prototype_
push 0
push edi
call esi
cmp dword [edi], 0
je 0x41697f
push dword [ebp + 0xc]
lea esi, [ebp - 8]
push dword [ebp + 8]
call fcn.004036ea
lea eax, [edi + 4]
push eax
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 8]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4169ad
mov esi, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
xor eax, eax
inc eax
push 0
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], eax
lea eax, [ebp + 0xc]
push eax
push 3
push ecx
call esi
push 0
lea eax, [ebp + 8]
push eax
push 4
push dword [edi + 4]
call esi
pop esi
pop ebx
leave
ret 8

Function at 0x417c52
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x417c99
call fcn.00413121
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x417c99
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x417cb5
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.0041aca3
mov esi, eax
test edi, edi
je 0x417cb3
test ebx, ebx
je 0x417cb3
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x41add0
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebx
xor ebx, ebx
push ebp
push edi
cmp dword [esi + 0x34], ebx
ja 0x41ade4
cmp dword [esi + 0x30], 0x40
jbe 0x41aee8
mov edi, dword [esi + 0x28]
mov ebp, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0x40
push edi
call ebp
test eax, eax
jne 0x41aeed
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x41aeed
mov byte [esi + 0x38], 1
mov eax, dword [edi + 0x3c]
mov edi, dword [esi + 0x34]
xor ecx, ecx
lea edx, [eax + 0xf8]
cmp edi, ecx
jb 0x41aee8
ja 0x41ae2f
mov ecx, dword [esi + 0x30]
cmp ecx, edx
jbe 0x41aee8
mov edx, dword [esi + 0x28]
add eax, edx
push 0xf8
push eax
mov dword [esi + 0x24], eax
call ebp
test eax, eax
jne 0x41aeed
mov eax, dword [esi + 0x24]
cmp dword [eax], 0x4550
jne 0x41aeed
mov ecx, 0x2000
test word [eax + 0x16], cx
jne 0x41ae65
mov byte [esi + 0x44], 1
mov edx, eax
movzx eax, word [edx + 0x18]
mov ecx, 0x10b
cmp ax, cx
jne 0x41ae81
mov dword [esi + 0x40], 1
add edx, 0x78
jmp 0x41ae98
mov ecx, 0x20b
cmp ax, cx
jne 0x41ae9b
mov dword [esi + 0x40], 2
add edx, 0x88
mov dword [esi + 0x20], edx
cmp dword [esi + 0x20], ebx
je 0x41aeed
mov eax, dword [esi + 0x24]
movzx ecx, word [eax + 6]
mov dword [esi + 0x3c], ecx
test ecx, ecx
je 0x41aeed
movzx edx, word [eax + 0x14]
mov ebx, dword [esi + 0x34]
lea ecx, [ecx + ecx*4]
add ecx, ecx
add ecx, ecx
add ecx, ecx
sub ecx, dword [esi + 0x28]
add ecx, edx
lea edi, [ecx + eax + 0x18]
xor ecx, ecx
cmp ebx, ecx
jb 0x41aee8
ja 0x41aed6
mov ecx, dword [esi + 0x30]
cmp ecx, edi
jbe 0x41aee8
pop edi
mov ebx, 1
lea edx, [edx + eax + 0x18]
pop ebp
mov eax, ebx
mov dword [esi + 0x1c], edx
pop ebx
ret
mov ebx, 2
pop edi
pop ebp
mov eax, ebx
pop ebx
ret

Function at 0x41b9e3
Capabilities:
Get common file path

Disassembly:
push ebp
sub esp, 0x208
lea ebp, [esp - 4]
mov eax, dword [0x44dd60]
xor eax, ebp
mov dword [ebp + 0x208], eax
push 0x10
mov eax, 0x437880
call fcn.00425691
xor eax, eax
mov dword [ebp - 4], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
push 0x206
push eax
lea eax, [ebp + 2]
xor ecx, ecx
push eax
mov word [ebp], cx
call fcn.00423b00
add esp, 0xc
push 0x104
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push edi
lea ecx, [ebp]
call fcn.00418362
lea eax, [ebp - 0x10]
push 0x441b4c
push eax
mov esi, edi
mov dword [ebp - 0x18], ebx
call fcn.004075de
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x214]
push ecx
lea ecx, [ebp - 0x14]
push ecx
mov esi, eax
call fcn.0040dd23
add esp, 0x10
mov byte [ebp - 4], 3
call fcn.0041756f
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.004167f9
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x10]
call fcn.004167f9
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x214]
call fcn.004167f9
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.00406073
add ebp, 0x20c
leave
ret
Function at 0x420a61
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [esi + 0x2c]
push edi
mov edi, dword [esi + 0x3c]
sub edi, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub edi, eax
lea ecx, [ebx + ecx - 0x106]
mov dword [ebp - 8], edi
cmp eax, ecx
jb 0x420af0
mov eax, dword [esi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.00423b80
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
sub dword [esi + 0x70], ebx
sub dword [esi + 0x6c], ebx
add esp, 0xc
sub dword [esi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x420ab0
mov eax, dword [esi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x420ad2
add edi, ebx
mov dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x420bae
mov eax, dword [esi + 0x74]
add eax, dword [esi + 0x6c]
mov ecx, dword [edi + 4]
add eax, dword [esi + 0x38]
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
cmp ecx, edx
jbe 0x420b18
mov dword [ebp - 4], edx
mov edx, dword [ebp - 4]
test edx, edx
jne 0x420b23
xor eax, eax
jmp 0x420b6f
sub ecx, edx
mov dword [edi + 4], ecx
mov ecx, dword [edi + 0x1c]
mov ecx, dword [ecx + 0x18]
cmp ecx, 1
jne 0x420b40
push edx
push dword [edi]
push dword [edi + 0x30]
call fcn.004213b1
jmp 0x420b50
cmp ecx, 2
jne 0x420b59
push edx
push dword [edi]
push dword [edi + 0x30]
call fcn.00422ce3
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
push dword [ebp - 4]
push dword [edi]
push eax
call fcn.00423b80
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x74], eax
mov edi, dword [esi + 0x74]
cmp edi, 3
jb 0x420b9a
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [esi + 0x58]
mov dword [esi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp edi, 0x106
jae 0x420bae
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x420a6e
pop edi
pop ebx
leave
ret
Function at 0x4230be
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x274
mov eax, dword [0x44dd60]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0x800
mov eax, dword [ebp + 8]
push esi
mov dword [ebp - 0x234], eax
mov esi, ecx
lea eax, [ebp - 0xc]
jne 0x423156
push 0x43ed64
push 4
push eax
call fcn.00424754
push eax
call fcn.00402801
add esp, 0x10
push ebx
push edi
call fcn.0042581c
mov edi, dword [eax]
call fcn.0042581c
xor ebx, ebx
mov dword [eax], ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x234]
lea eax, [ebp - 0x230]
push esi
push 0x111
mov esi, 0x112
push esi
push eax
call fcn.004257b9
add esp, 0x18
mov dword [ebp - 0x234], eax
call fcn.0042581c
cmp dword [eax], ebx
je 0x42316d
call fcn.0042581c
push dword [eax]
call fcn.00417960
pop ecx
jmp 0x423174
push 4
push eax
push 3
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jne 0x423101
jmp 0x4231fb
call fcn.0042581c
mov dword [eax], edi
cmp dword [ebp - 0x234], 0xffffffff
je 0x4231f7
cmp dword [ebp - 0x234], esi
jae 0x4231f7
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x3c
mov esi, eax
lea eax, [ebp - 0x270]
push ebx
push eax
mov dword [ebp - 0x274], 0x40
call fcn.00423b00
add esp, 0xc
push 0x43e974
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
je 0x4231e6
push str.FindActCtxSectionStringW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4231e6
lea ecx, [ebp - 0x274]
push ecx
push esi
push 2
push ebx
push ebx
call eax
test eax, eax
je 0x4231e6
push ebx
push ebx
push esi
jmp 0x4231ef
push ebx
push ebx
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
jmp 0x4231f9
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00406073
leave
ret
Function at 0x430092
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00428143
and dword [ebp - 4], 0
cmp dword [0x451fe0], 0
mov ebx, eax
jne 0x430143
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4301f4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4301f4
push eax
call fcn.004280d1
mov dword [esp], 0x44035c
push edi
mov dword [0x451fe0], eax
call esi
push eax
call fcn.004280d1
mov dword [esp], 0x440348
push edi
mov dword [0x451fe4], eax
call esi
push eax
call fcn.004280d1
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x451fe8], eax
call esi
push eax
call fcn.004280d1
pop ecx
mov dword [0x451ff0], eax
test eax, eax
je 0x430143
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004280d1
pop ecx
mov dword [0x451fec], eax
mov eax, dword [0x451fec]
cmp eax, ebx
je 0x43019b
cmp dword [0x451ff0], ebx
je 0x43019b
push eax
call fcn.0042814c
push dword [0x451ff0]
mov esi, eax
call fcn.0042814c
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x43019b
test edi, edi
je 0x43019b
call esi
test eax, eax
je 0x430192
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x430192
test byte [ebp - 0xc], 1
jne 0x43019b
or dword [ebp + 0x10], 0x200000
jmp 0x4301d4
mov eax, dword [0x451fe4]
cmp eax, ebx
je 0x4301d4
push eax
call fcn.0042814c
pop ecx
test eax, eax
je 0x4301d4
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4301d4
mov eax, dword [0x451fe8]
cmp eax, ebx
je 0x4301d4
push eax
call fcn.0042814c
pop ecx
test eax, eax
je 0x4301d4
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x451fe0]
call fcn.0042814c
pop ecx
test eax, eax
je 0x4301f4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4301f6
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401a10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x40c
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], esi
mov word [0x42bef8], si
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x3f2
jl 0x401a2d
push 0x20
call fcn.00401b70
mov edi, eax
add esp, 4
cmp edi, esi
mov dword [esp + 0x14], edi
jle 0x401b26
cmp esi, 0xa620
jle 0x401a7c
mov ecx, dword [esp + 0x420]
lea eax, [esp + 0x18]
push 0
push eax
push esi
push 0x405020
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401b49
xor esi, esi
push 1
call fcn.00401b70
add esp, 4
cmp eax, 1
jne 0x401ae0
push 0xa
call fcn.00401b70
add esp, 4
mov ebx, eax
push 4
call fcn.00401b70
add esp, 4
test ax, ax
jle 0x401b0a
movsx edi, word [0x42bef8]
movsx ecx, bx
add ecx, edi
movsx ebx, ax
mov edx, ecx
lea ebp, [edi - 0xe]
and edx, 0x3ff
and ebp, 0x3ff
inc esi
inc ecx
mov dl, byte [esp + edx + 0x1c]
inc edi
mov byte [esi + 0x40501f], dl
dec ebx
mov byte [esp + ebp + 0x1c], dl
jne 0x401ab5
mov edi, dword [esp + 0x14]
jmp 0x401b0a
push 8
call fcn.00401b70
mov cx, word [0x42bef8]
add esp, 4
sub ecx, 0xe
mov byte [esi + 0x405020], al
and ecx, 0x3ff
inc esi
mov byte [esp + ecx + 0x1c], al
mov eax, 1
add word [0x42bef8], ax
movsx edx, ax
mov eax, dword [esp + 0x10]
add eax, edx
cmp eax, edi
mov dword [esp + 0x10], eax
jl 0x401a4f
test esi, esi
je 0x401b56
mov ecx, dword [esp + 0x420]
lea eax, [esp + 0x18]
push 0
push eax
push esi
push 0x405020
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401b56
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40c
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40c
ret
Function at 0x401c50
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x402c68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x42bc4c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x42bc48], ecx
shl ecx, 8
add ecx, edx
mov dword [0x42bc44], ecx
shr eax, 0x10
mov dword [0x42bc40], eax
call fcn.00402b30
test eax, eax
jne 0x401cba
push 0x1c
call fcn.00401df0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00402930
call fcn.00402920
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42c010], eax
call fcn.004024f0
mov dword [0x42bc28], eax
test eax, eax
je 0x401ced
mov eax, dword [0x42c010]
test eax, eax
jne 0x401cf7
push 0xffffffffffffffff
call fcn.00401e50
add esp, 4
call fcn.00402240
call fcn.00402150
call fcn.00401e20
mov esi, dword [0x42c010]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x401dd6
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x401d3e
test al, al
je 0x401d3e
and eax, 0xff
push eax
call fcn.004020f0
add esp, 4
test eax, eax
je 0x401d18
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401d18
cmp byte [esi], 0x22
jne 0x401d47
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x401d57
cmp al, 0x20
ja 0x401d57
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401d47
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x401d78
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x401d7d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00401e50
jmp 0x401dbb
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x401d47
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401dd6

Function at 0x401e90
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x42bc7c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x401eaf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x42bc78], 1
mov byte [0x42bc74], bl
jne 0x401f09
mov ecx, dword [0x42c008]
test ecx, ecx
je 0x401ef7
mov esi, dword [0x42c004]
sub esi, 4
cmp esi, ecx
jb 0x401ef7
mov eax, dword [esi]
test eax, eax
je 0x401ef0
call eax
mov ecx, dword [0x42c008]
sub esi, 4
cmp esi, ecx
jae 0x401ee2
push 0x405014
push 0x405010
call fcn.00401f40
add esp, 8
push 0x40501c
push 0x405018
call fcn.00401f40
add esp, 8
test ebx, ebx
jne 0x401f30
push ebp
mov dword [0x42bc7c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x4024f0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x42bd90]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x402532
call edi
mov esi, eax
test esi, esi
je 0x40251c
mov eax, 1
jmp 0x40252d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40263f
mov eax, 2
mov dword [0x42bd90], eax
cmp eax, 1
jne 0x4025d2
test esi, esi
jne 0x40254b
call edi
mov esi, eax
test esi, esi
je 0x40263f
cmp word [esi], 0
mov eax, esi
je 0x402565
add eax, 2
cmp word [eax], 0
jne 0x402553
add eax, 2
cmp word [eax], 0
jne 0x402553
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4025c4
push edi
call fcn.00402fb0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4025c4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4025b6
push ebx
call fcn.00402f60
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40263f
test ebx, ebx
jne 0x4025e3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40263f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4025fb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4025eb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4025eb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00402fb0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40261d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x402d80
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x429950
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x402da4
add eax, 8
inc ebp
cmp eax, 0x4299e0
jb 0x402d95
cmp ecx, dword [ebp*8 + 0x429950]
jne 0x402f4b
mov eax, dword [0x42bc30]
cmp eax, 1
je 0x402f0d
test eax, eax
jne 0x402dd0
cmp dword [0x4297a8], 1
je 0x402f0d
cmp ecx, 0xfc
je 0x402f4b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x402e0b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x402e54
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4042e0
add ebx, ecx
push ebx
call fcn.00403810
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4042c0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x429954]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00403780
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x42bf00]
test eax, eax
je 0x402f1e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x402f28
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x429954]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret