joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41e0b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0xf2f56f
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e161
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e14a
test esi, esi
jbe 0x41e161
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088ac
test eax, eax
jne 0x41e13c
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e161
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e119
jmp 0x41e161
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e161
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xf2f576
ret
Function at 0x41e9a4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0xf2ff53
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41e9df
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41e9f8
lea eax, [ebp - 0x10]
mov edx, dword [0xf48248]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41ea0b
lea eax, [ebp - 0x10]
mov edx, dword [0xf48248]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41ea17
adc edx, 0
mov edx, dword [edx*4 + 0xf470d8]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406af4
mov esi, eax
cmp esi, 0xffffffff
je 0x41eb25
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d3c
test eax, eax
je 0x41eb18
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41eb18
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406d9c
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d3c
test eax, eax
je 0x41eb18
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41eb18
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41eb18
cmp dx, 0x150
ja 0x41eb18
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d3c
test eax, eax
je 0x41eb18
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41eb18
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406aac
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41eb3d
inc ebx
cmp ebx, 0x19
jne 0x41e9d1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xf2ff5a
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x461f58
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x462037
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x462005
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00404ea8
push 0
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push ebx
call sub.kernel32.dll_GetVolumeInformationA
mov eax, dword [ebp - 8]
call fcn.00407ca8
movzx eax, ax
lea ecx, [ebp - 0x18]
mov edx, 4
call fcn.00409330
push dword [ebp - 0x18]
push 0x462050
lea ecx, [ebp - 0x1c]
movzx eax, word [ebp - 8]
mov edx, 4
call fcn.00409330
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00405228
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
call fcn.00404efc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x46201c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46203e
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404ecc
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4010e0
Capabilities:
Delete directory

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x104
push ebp
push 0
push eax
call fcn.00401af0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4011ed
push edi
push esi
push ebx
push ebp
call fcn.00401b10
mov ebx, eax
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
add esp, 4
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b040
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x18]
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.efe2.tmp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
lea eax, [esp + 0x24]
push 0x80000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x4011cf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x401200
push 0
push 0x40b03c
push ebx
call fcn.004016e0
add esp, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [esp + 0x118]
push ebp
push ecx
call fcn.00401af0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x401103
pop ebx
pop esi
pop edi
pop ebp
add esp, 0x104
ret

Function at 0x401310
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x104
lea eax, [esp]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x401334
xor ax, ax
add esp, 0x104
ret
push edi
mov edi, 0x40b040
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push esi
sub edi, ecx
push ebx
lea edx, [esp + 0xc]
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 + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wininit.ini
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 + 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4013c0
mov ecx, dword [esp + 0x114]
lea edx, [esp + 0xc]
push ecx
push edx
call fcn.004013e0
add esp, 8
pop ebx
pop esi
pop edi
add esp, 0x104
ret
mov eax, dword [esp + 0x114]
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.00401440
add esp, 8
pop ebx
pop esi
pop edi
add esp, 0x104
ret
Function at 0x401440
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
sub esp, 0x70c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x71c]
push edi
lea eax, [esp + 0x11c]
push 0
lea ecx, [esp + 0x220]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
push esi
mov dword [esp + 0x24], 0
call fcn.00402330
add esp, 0x14
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x21c]
lea edx, [esp + 0x14]
push 0x40b068
push eax
push ecx
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00402290
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4014bb
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x4014d9
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70c
ret
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401509
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70c
ret
push 0
push 0x80
push 3
push 0
push 0
lea ecx, [esp + 0x2c]
push 0x80000000
push ecx
call esi
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40153e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70c
ret
lea edx, [esp + 0x31c]
push 0x400
push edx
push ebp
call fcn.00401680
lea edi, [esp + 0x328]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4015d2
lea eax, [esp + 0x31c]
push eax
push ebx
call fcn.00401650
mov al, byte [esp + 0x324]
add esp, 8
test al, al
lea esi, [esp + 0x31c]
je 0x4015a0
movsx ecx, al
push ecx
call fcn.00402100
add esp, 4
mov byte [esi], al
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x40158a
lea edx, [esp + 0x31c]
push str._rename_
push edx
call fcn.00402060
add esp, 8
test eax, eax
je 0x4015d2
mov eax, dword [esp + 0x724]
push eax
push ebx
call fcn.00401610
add esp, 8
mov dword [esp + 0x10], 1
lea edi, [esp + 0x31c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x40153e
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push ebx
call esi
mov ax, word [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70c
ret

Function at 0x401650
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 8]
push edi
lea eax, [esp + 0xc]
push 0
push eax
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x14]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
ret
Function at 0x401680
Capabilities:
Read file on windows

Disassembly:
push ecx
mov ecx, dword [esp + 0x10]
push ebx
push esi
mov esi, dword [esp + 0x14]
mov edx, ecx
push edi
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, edx
and ecx, 3
mov dword [esp + 0xc], 1
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push 0
push eax
push 1
push esi
push edi
call ebx
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4016cf
cmp byte [esi], 0xa
je 0x4016cf
inc esi
test eax, eax
jne 0x4016b0
pop edi
pop esi
mov ax, 1
pop ebx
pop ecx
ret
Function at 0x401d90
Capabilities:
Accept command line arguments

Disassembly:
push esi
mov esi, dword [esp + 8]
mov dword [0x40edb8], esi
call fcn.00401f30
test ax, ax
jne 0x401da9
xor eax, eax
pop esi
ret
mov eax, dword [0x40ee24]
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
mov dword [0x40ebe8], eax
jne 0x401dc7
pop esi
ret
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x40ee28], eax
jne 0x401deb
mov ecx, dword [0x40ebe8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push esi
push 0
push 0
push 0
push 0x80000000
push 0
push 0x80000000
push 0xcf0000
push 0x40edc0
push 0x40ed20
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
test eax, eax
mov dword [0x40edb4], eax
jne 0x401e22
pop esi
ret
mov edx, dword [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x40edb4]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
pop esi
ret

Function at 0x401f30
Capabilities:
Accept command line arguments

Disassembly:
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0x40ec00
push 0x40ee24
push 0x40eae0
push str.________lu_______
push eax
call fcn.00402780
add esp, 0x14
xor ecx, ecx
cmp eax, 3
sete cl
mov ax, cx
ret

Function at 0x401f60
Capabilities:
Create thread

Disassembly:
push ecx
mov eax, dword [0x40edb4]
mov ecx, dword [0x40ee28]
mov edx, dword [0x40ebe8]
mov dword [0x40eda0], eax
lea eax, [esp]
mov dword [0x40eda4], ecx
push eax
push 0
push 0x40eda0
push section..text
push 0
push 0
mov dword [0x40eda8], edx
mov dword [0x40edac], 0x40eae0
mov dword [0x40edb0], 0x40ec00
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor ecx, ecx
mov dword [0x40ebe4], eax
test eax, eax
setne cl
mov ax, cx
pop ecx
ret
Function at 0x4027d0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x409170
push 0x405878
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 [0x40e820], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40e81c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40e818], ecx
shr eax, 0x10
mov dword [0x40e814], eax
call fcn.004035d0
test eax, eax
jne 0x40283a
push 0x1c
call fcn.004029b0
add esp, 4
call fcn.00405680
test eax, eax
jne 0x40284d
push 0x10
call fcn.004029b0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00405470
call fcn.00402f80
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ff80], eax
call fcn.00405310
mov dword [0x40e540], eax
test eax, eax
je 0x402880
mov eax, dword [0x40ff80]
test eax, eax
jne 0x40288a
push 0xffffffffffffffff
call fcn.00404b80
add esp, 4
call fcn.00405060
call fcn.00404f70
call fcn.00404b50
mov esi, dword [0x40ff80]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x402969
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4028d1
test al, al
je 0x4028d1
and eax, 0xff
push eax
call fcn.00404f10
add esp, 4
test eax, eax
je 0x4028ab
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4028ab
cmp byte [esi], 0x22
jne 0x4028da
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4028ea
cmp al, 0x20
ja 0x4028ea
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4028da
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40290b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x402910
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.00404b80
jmp 0x40294e
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 0x4028da
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402969

Function at 0x4029b0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40e548], 1
jne 0x4029be
call fcn.00405950
mov eax, dword [esp + 4]
push eax
call fcn.00405990
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x404bc0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00404c80
mov eax, dword [0x40e850]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x404be4
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 [0x40e84c], 1
mov byte [0x40e848], bl
jne 0x404c3e
mov ecx, dword [0x40ff68]
test ecx, ecx
je 0x404c2c
mov esi, dword [0x40ff64]
sub esi, 4
cmp esi, ecx
jb 0x404c2c
mov eax, dword [esi]
test eax, eax
je 0x404c25
call eax
mov ecx, dword [0x40ff68]
sub esi, 4
cmp esi, ecx
jae 0x404c17
push 0x40b01c
push 0x40b014
call fcn.00404ca0
add esp, 8
push 0x40b024
push 0x40b020
call fcn.00404ca0
add esp, 8
test ebx, ebx
je 0x404c5d
call fcn.00404c90
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x40e850], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x405310
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40e960]
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 0x405352
call edi
mov esi, eax
test esi, esi
je 0x40533c
mov eax, 1
jmp 0x40534d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40545f
mov eax, 2
mov dword [0x40e960], eax
cmp eax, 1
jne 0x4053f2
test esi, esi
jne 0x40536b
call edi
mov esi, eax
test esi, esi
je 0x40545f
cmp word [esi], 0
mov eax, esi
je 0x405385
add eax, 2
cmp word [eax], 0
jne 0x405373
add eax, 2
cmp word [eax], 0
jne 0x405373
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 0x4053e4
push edi
call fcn.00402640
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4053e4
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 0x4053d6
push ebx
call fcn.00402710
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 0x40545f
test ebx, ebx
jne 0x405403
call ebp
mov ebx, eax
test ebx, ebx
je 0x40545f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40541b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40540b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40540b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00402640
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40543d
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 0x405680
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00402f90
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x40d6fc], eax
je 0x4056d8
push 0x74
push 1
call fcn.00407470
mov esi, eax
add esp, 8
test esi, esi
je 0x4056d8
mov eax, dword [0x40d6fc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4056d8
push esi
call fcn.004056e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x405700
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x40d6fc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40576e
push 0x74
push 1
call fcn.00407470
mov esi, eax
add esp, 8
test esi, esi
je 0x405764
mov ecx, dword [0x40d6fc]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x405764
push esi
call fcn.004056e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.00402980
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x405990
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40d710
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4059b4
add eax, 8
inc ebp
cmp eax, 0x40d7a0
jb 0x4059a5
cmp ecx, dword [ebp*8 + 0x40d710]
jne 0x405b5b
mov eax, dword [0x40e548]
cmp eax, 1
je 0x405b1d
test eax, eax
jne 0x4059e0
cmp dword [0x40b0d4], 1
je 0x405b1d
cmp ecx, 0xfc
je 0x405b5b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405a1b
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 0x405a64
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 0x409494
add ebx, ecx
push ebx
call fcn.00406f20
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, 0x409474
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 + 0x40d714]
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.00407520
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40fe60]
test eax, eax
je 0x405b2e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x405b38
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40d714]
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