joyce8/EMBER2024-capa huggingface dataset:
Function at 0x108f983
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
or dword [ebp - 8], 0xffffffff
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov eax, esi
xor edi, edi
neg eax
lea ecx, [esi + 8]
sbb eax, eax
and eax, ecx
push eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call fcn.0108a8d7
cmp dword [esi + 0x98], ebx
jne 0x108f9c7
mov edi, 0x802a0035
jmp 0x108fb37
mov eax, dword [esi + 0x94]
cmp eax, ebx
jne 0x108f9ec
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x108f9e2
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x108fb53
cmp dword [esi + 0x9c], ebx
jne 0x108fb37
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x108fa44
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x108fa3a
call esi
cmp eax, ebx
jle 0x108fa33
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x108fb37
mov edi, 0x8000ffff
jmp 0x108fb37
mov eax, dword [esi]
lea ecx, [ebp - 0xc]
push ecx
push esi
call dword [eax + 0x14]
push 1
mov ecx, esi
call fcn.0108f7ce
mov edi, eax
cmp edi, ebx
jge 0x108fab1
jmp 0x108fb37
push ebx
lea eax, [ebp - 0x10]
push eax
mov eax, dword [esi + 0x78]
push dword [ebp - 4]
add eax, dword [esi + 0x80]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x108fa9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x108fa95
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov edi, eax
jl 0x108fb37
mov eax, dword [ebp - 4]
add dword [esi + 0x84], eax
mov eax, dword [ebp - 0x10]
add dword [esi + 0x80], eax
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.0108f36e
cmp dword [ebp - 4], ebx
ja 0x108fa62
mov ecx, esi
call fcn.0108f00c
mov edi, eax
cmp edi, ebx
jl 0x108fb37
push ebx
call fcn.0108f7ce
mov edi, eax
cmp edi, ebx
jl 0x108fb37
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
or dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x94]
lea ebx, [esi + 0x90]
push ebx
push eax
call fcn.0108c8a9
mov edi, eax
test edi, edi
jl 0x108fb35
mov ebx, dword [ebx]
mov eax, dword [ebx]
lea ecx, [ebp - 0x14]
push ecx
push ebx
call dword [eax + 0x10]
mov edi, eax
test edi, edi
jl 0x108fb35
mov eax, dword [ebp - 0x14]
xor ebx, ebx
cmp eax, dword [ebp - 0xc]
je 0x108fb29
mov edi, 0x80004005
jmp 0x108fb37
mov dword [esi + 0x9c], 1
jmp 0x108fb37
xor ebx, ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x108fb51
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10905c1
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x10905d4
xor eax, eax
jmp 0x10906aa
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
not eax
mov ecx, 0xff
cmp edi, 8
jb 0x109068d
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x10906b0]
inc edx
sub edi, 8
dec esi
jne 0x10905f2
pop ebx
test edi, edi
je 0x10906a6
movzx esi, byte [edx]
xor esi, eax
and esi, ecx
shr eax, 8
xor eax, dword [esi*4 + 0x10906b0]
inc edx
dec edi
jne 0x1090691
pop edi
not eax
pop esi
pop ebp
ret 0xc
Function at 0x109151c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, dword [esi + 0x24]
mov dword [ebp - 0xc], edi
jmp 0x1091531
mov edi, dword [ebp - 0xc]
mov ecx, dword [esi + 0x64]
mov eax, dword [esi + 0x34]
mov edx, dword [esi + 0x6c]
sub eax, ecx
sub eax, edx
mov dword [ebp - 8], eax
jne 0x1091550
test ecx, ecx
jne 0x109155e
test edx, edx
jne 0x109155e
mov dword [ebp - 8], edi
jmp 0x10915c8
cmp eax, 0xffffffff
jne 0x109155e
mov dword [ebp - 8], 0xfffffffe
jmp 0x10915c8
mov eax, dword [esi + 0x24]
lea eax, [edi + eax - 0x106]
cmp ecx, eax
jb 0x10915c8
mov eax, dword [esi + 0x30]
push edi
lea ecx, [eax + edi]
push ecx
push eax
call sub.msvcrt.dll_memcpy
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x3c]
sub dword [esi + 0x68], edi
sub dword [esi + 0x64], edi
add esp, 0xc
sub dword [esi + 0x54], edi
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx edx, word [eax]
mov ebx, edx
sub ebx, edi
cmp edx, edi
sbb edx, edx
not edx
and edx, ebx
dec ecx
mov word [eax], dx
jne 0x109158f
mov eax, dword [esi + 0x38]
mov edx, edi
lea eax, [eax + edi*2]
dec eax
dec eax
movzx ecx, word [eax]
mov ebx, ecx
sub ebx, edi
cmp ecx, edi
sbb ecx, ecx
not ecx
and ecx, ebx
dec edx
mov word [eax], cx
jne 0x10915ae
add dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x109166b
mov ebx, dword [esi + 0x6c]
add ebx, dword [esi + 0x64]
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 8]
add ebx, dword [esi + 0x30]
mov dword [ebp - 4], eax
cmp eax, ecx
jbe 0x10915ed
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jne 0x10915f7
xor eax, eax
jmp 0x109162c
sub eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x18], 0
jne 0x1091616
push dword [ebp - 4]
push dword [edi]
push dword [edi + 0x30]
call fcn.01092978
mov dword [edi + 0x30], eax
push dword [ebp - 4]
push dword [edi]
push ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x6c], eax
mov edi, dword [esi + 0x6c]
cmp edi, 3
jb 0x1091657
mov eax, dword [esi + 0x64]
mov ecx, dword [esi + 0x30]
lea edx, [ecx + eax]
movzx eax, byte [edx]
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x40], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x4c]
mov dword [esi + 0x40], eax
cmp edi, 0x106
jae 0x109166b
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x109152e
pop edi
pop ebx
leave
ret
Function at 0x4016f0
Capabilities:
Delete registry value

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
test ebp, ebp
push edi
je 0x40185c
push 0x5c
push ebp
call fcn.004022f0
mov edi, eax
add esp, 8
mov esi, str.HKEY_LOCAL_MACHINE
mov ecx, ebp
mov byte [edi], 0
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x40173f
test dl, dl
je 0x40173b
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x40173f
add ecx, 2
add esi, 2
test dl, dl
jne 0x401717
xor ecx, ecx
jmp 0x401744
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401752
mov ebx, 0x80000002
jmp 0x40180d
mov esi, str.HKEY_USERS
mov ecx, ebp
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401781
test dl, dl
je 0x40177d
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401781
add ecx, 2
add esi, 2
test dl, dl
jne 0x401759
xor ecx, ecx
jmp 0x401786
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401791
mov ebx, 0x80000003
jmp 0x40180d
mov esi, str.HKEY_CURRENT_USER
mov ecx, ebp
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x4017c0
test dl, dl
je 0x4017bc
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x4017c0
add ecx, 2
add esi, 2
test dl, dl
jne 0x401798
xor ecx, ecx
jmp 0x4017c5
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x4017d0
mov ebx, 0x80000001
jmp 0x40180d
mov esi, str.HKEY_CLASSES_ROOT
mov ecx, ebp
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x4017ff
test dl, dl
je 0x4017fb
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x4017ff
add ecx, 2
add esi, 2
test dl, dl
jne 0x4017d7
xor ecx, ecx
jmp 0x401804
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x40185c
mov ebx, 0x80000000
mov byte [edi], 0x5c
inc edi
push 0x5c
push edi
call fcn.004022b0
mov esi, eax
add esp, 8
test esi, esi
je 0x40185c
lea ecx, [esp + 0x14]
mov byte [esi], 0
push ecx
push 0xf003f
push 0
push edi
push ebx
inc esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40185c
mov edx, dword [esp + 0x14]
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
Function at 0x401870
Capabilities:
Delete registry key

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
test edi, edi
je 0x4019b9
push 0x5c
push edi
call fcn.004022f0
mov ebp, eax
add esp, 8
mov esi, str.HKEY_LOCAL_MACHINE
mov ecx, edi
mov byte [ebp], 0
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x4018c0
test dl, dl
je 0x4018bc
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x4018c0
add ecx, 2
add esi, 2
test dl, dl
jne 0x401898
xor ecx, ecx
jmp 0x4018c5
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x4018d3
mov edi, 0x80000002
jmp 0x40198e
mov esi, str.HKEY_USERS
mov ecx, edi
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401902
test dl, dl
je 0x4018fe
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401902
add ecx, 2
add esi, 2
test dl, dl
jne 0x4018da
xor ecx, ecx
jmp 0x401907
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401912
mov edi, 0x80000003
jmp 0x40198e
mov esi, str.HKEY_CURRENT_USER
mov ecx, edi
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401941
test dl, dl
je 0x40193d
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401941
add ecx, 2
add esi, 2
test dl, dl
jne 0x401919
xor ecx, ecx
jmp 0x401946
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401951
mov edi, 0x80000001
jmp 0x40198e
mov esi, str.HKEY_CLASSES_ROOT
mov ecx, edi
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401980
test dl, dl
je 0x40197c
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401980
add ecx, 2
add esi, 2
test dl, dl
jne 0x401958
xor ecx, ecx
jmp 0x401985
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x4019b9
mov edi, 0x80000000
lea esi, [ebp + 1]
push 0x5c
push esi
mov byte [ebp], 0x5c
call fcn.004022b0
add esp, 8
test eax, eax
je 0x4019b9
push esi
push edi
mov byte [eax], 0
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
sete al
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
Function at 0x4019c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
test ebp, ebp
push edi
je 0x401b87
push 0x5c
push ebp
call fcn.004022f0
mov edi, eax
add esp, 8
mov esi, str.HKEY_LOCAL_MACHINE
mov ecx, ebp
mov byte [edi], 0
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401a10
test dl, dl
je 0x401a0c
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401a10
add ecx, 2
add esi, 2
test dl, dl
jne 0x4019e8
xor ecx, ecx
jmp 0x401a15
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401a23
mov ebx, 0x80000002
jmp 0x401ae5
mov esi, str.HKEY_USERS
mov ecx, ebp
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401a52
test dl, dl
je 0x401a4e
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401a52
add ecx, 2
add esi, 2
test dl, dl
jne 0x401a2a
xor ecx, ecx
jmp 0x401a57
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401a65
mov ebx, 0x80000003
jmp 0x401ae5
mov esi, str.HKEY_CURRENT_USER
mov ecx, ebp
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401a94
test dl, dl
je 0x401a90
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401a94
add ecx, 2
add esi, 2
test dl, dl
jne 0x401a6c
xor ecx, ecx
jmp 0x401a99
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401aa4
mov ebx, 0x80000001
jmp 0x401ae5
mov esi, str.HKEY_CLASSES_ROOT
mov ecx, ebp
mov al, byte [ecx]
mov bl, byte [esi]
mov dl, al
cmp al, bl
jne 0x401ad3
test dl, dl
je 0x401acf
mov al, byte [ecx + 1]
mov bl, byte [esi + 1]
mov dl, al
cmp al, bl
jne 0x401ad3
add ecx, 2
add esi, 2
test dl, dl
jne 0x401aab
xor ecx, ecx
jmp 0x401ad8
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x401b87
mov ebx, 0x80000000
mov byte [edi], 0x5c
inc edi
push 0x5c
push edi
call fcn.004022b0
mov esi, eax
add esp, 8
test esi, esi
je 0x401b87
lea ecx, [esp + 0x18]
mov byte [esi], 0
push ecx
push 1
push 0
push edi
push ebx
inc esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401b87
push 0x100
mov dword [esp + 0x14], 0x100
call fcn.00402400
mov edi, dword [esp + 0x20]
add esp, 4
lea edx, [esp + 0x10]
push edx
push eax
mov dword [edi], eax
mov eax, dword [esp + 0x20]
push 0
push 0
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov dword [esp + 0x10], eax
je 0x401b74
mov ecx, dword [edi]
push ecx
call fcn.004023b0
mov edx, dword [esp + 0x1c]
add esp, 4
mov dword [edi], 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
Function at 0x401e90
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
test esi, esi
push edi
jne 0x401ea9
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401ebf
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov ebx, eax
shr ebx, 4
and bl, 1
test al, 1
je 0x401ed5
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov al, byte [esp + 0x38]
test al, al
je 0x401f61
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea eax, [ebx + 2]
push eax
call fcn.00402400
lea ecx, [ebx + 1]
mov ebp, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
lea eax, [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
xor esi, esi
mov byte [ebp + ebx + 1], 0
push eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], esi
mov word [esp + 0x24], 0x54
mov dword [esp + 0x2a], esi
mov dword [esp + 0x2e], esi
mov dword [esp + 0x26], esi
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
push ebp
mov edi, eax
call fcn.004023b0
add esp, 4
cmp edi, esi
sete al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test bl, bl
jne 0x401f79
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
setne al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push 1
push esi
call fcn.00401b90
add esp, 8
and eax, 0xff
mov dword [esp + 0x38], eax
pop edi
pop esi
pop ebp
pop ebx
setne al
add esp, 0x20
ret

Function at 0x4021e0
Capabilities:
Create thread

Disassembly:
mov ecx, dword [esp + 4]
lea eax, [esp + 4]
push eax
push 0
push ecx
push 0x401fa0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov al, 1
ret
Function at 0x4024b0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x4047f8
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 [0x4c3638], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x4c3634], ecx
shl ecx, 8
add ecx, edx
mov dword [0x4c3630], ecx
shr eax, 0x10
mov dword [0x4c362c], eax
call fcn.00403270
test eax, eax
jne 0x40251a
push 0x1c
call fcn.00402650
add esp, 4
mov dword [ebp - 4], 0
call fcn.00404500
call fcn.004044f0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4c4a14], eax
call fcn.004040c0
mov dword [0x4c3608], eax
test eax, eax
je 0x40254d
mov eax, dword [0x4c4a14]
test eax, eax
jne 0x402557
push 0xffffffffffffffff
call fcn.00403a20
add esp, 4
call fcn.00403e10
call fcn.00403d20
call fcn.004039f0
mov esi, dword [0x4c4a14]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x402636
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40259e
test al, al
je 0x40259e
and eax, 0xff
push eax
call fcn.00403cc0
add esp, 4
test eax, eax
je 0x402578
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402578
cmp byte [esi], 0x22
jne 0x4025a7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4025b7
cmp al, 0x20
ja 0x4025b7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4025a7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x4025d8
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x4025dd
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.00403a20
jmp 0x40261b
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 0x4025a7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402636

Function at 0x403a60
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x4c3668]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x403a7f
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 [0x4c3664], 1
mov byte [0x4c3660], bl
jne 0x403ad9
mov ecx, dword [0x4c4a08]
test ecx, ecx
je 0x403ac7
mov esi, dword [0x4c4a04]
sub esi, 4
cmp esi, ecx
jb 0x403ac7
mov eax, dword [esi]
test eax, eax
je 0x403ac0
call eax
mov ecx, dword [0x4c4a08]
sub esi, 4
cmp esi, ecx
jae 0x403ab2
push 0x40701c
push 0x407014
call fcn.00403b10
add esp, 8
push 0x407024
push 0x407020
call fcn.00403b10
add esp, 8
test ebx, ebx
jne 0x403b00
push ebp
mov dword [0x4c3668], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x4040c0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4c3778]
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 0x404102
call edi
mov esi, eax
test esi, esi
je 0x4040ec
mov eax, 1
jmp 0x4040fd
call ebp
mov ebx, eax
test ebx, ebx
je 0x40420f
mov eax, 2
mov dword [0x4c3778], eax
cmp eax, 1
jne 0x4041a2
test esi, esi
jne 0x40411b
call edi
mov esi, eax
test esi, esi
je 0x40420f
cmp word [esi], 0
mov eax, esi
je 0x404135
add eax, 2
cmp word [eax], 0
jne 0x404123
add eax, 2
cmp word [eax], 0
jne 0x404123
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 0x404194
push edi
call fcn.00402400
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x404194
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 0x404186
push ebx
call fcn.004023b0
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 0x40420f
test ebx, ebx
jne 0x4041b3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40420f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4041cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4041bb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4041bb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00402400
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4041ed
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 0x404910
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4c2318
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x404934
add eax, 8
inc ebp
cmp eax, 0x4c23a8
jb 0x404925
cmp ecx, dword [ebp*8 + 0x4c2318]
jne 0x404adb
mov eax, dword [0x4c3610]
cmp eax, 1
je 0x404a9d
test eax, eax
jne 0x404960
cmp dword [0x4c0144], 1
je 0x404a9d
cmp ecx, 0xfc
je 0x404adb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40499b
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 0x4049e4
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 0x406358
add ebx, ecx
push ebx
call fcn.00405140
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, 0x406338
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 + 0x4c231c]
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.004050b0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4c4900]
test eax, eax
je 0x404aae
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x404ab8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4c231c]
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