joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d13c
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
test edx, edx
jne 0x40d152
xor eax, eax
pop ebx
pop ebp
ret
xor eax, 0xffffffff
cmp ecx, 8
jb 0x40d242
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
sub ecx, 8
cmp ecx, 8
jae 0x40d15e
test ecx, ecx
je 0x40d264
xor ebx, ebx
mov bl, byte [edx]
xor ebx, eax
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41ee08]
shr eax, 8
xor ebx, eax
mov eax, ebx
inc edx
dec ecx
jne 0x40d246
xor eax, 0xffffffff
pop ebx
pop ebp
ret

Function at 0x413418
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0xff
mov eax, dword [ebp + 8]
push eax
push 0x4235e8
call fcn.00416048
add esp, 0xc
lea edx, [ebp - 8]
push 0
push 0
push 0
push edx
push 0x4235e8
call fcn.00413664
add esp, 0x14
push 0x421c30
lea ecx, [ebp - 8]
push ecx
call fcn.0040ff90
add esp, 8
mov byte [0x4235e8], 0
push 0
push 0
push 0
push 0
push 0
push 0xff
push 0x4235e8
lea eax, [ebp - 8]
push eax
call sub.KERNEL32.DLL_GetVolumeInformationA
test eax, eax
je 0x41348b
mov eax, 0x4235e8
jmp 0x41348d
xor eax, eax
pop ecx
pop ecx
pop ebp
ret
Function at 0x413494
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeb8
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
test byte [ebx + 8], 8
je 0x4134b9
cmp dword [ebx + 4], 0xfffffffe
jne 0x4134b9
or eax, 0xffffffff
jmp 0x4135f1
test byte [ebx + 8], 8
je 0x413526
cmp dword [ebx + 4], 0xffffffff
jne 0x413526
mov dword [esi + 8], 8
mov edx, dword [ebx + 0xc]
push edx
call fcn.00413418
pop ecx
mov edi, eax
test edi, edi
je 0x41350e
add esi, 0x10
xor eax, eax
push esi
push edi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov dword [ebx + 4], 0xfffffffe
xor eax, eax
jmp 0x4135f1
call fcn.00416498
test eax, eax
jne 0x41351e
xor eax, eax
jmp 0x4135f1
or eax, 0xffffffff
jmp 0x4135f1
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x413533
cmp eax, 0xfffffffe
jne 0x41355a
mov dword [ebx + 4], 0xffffffff
lea edx, [ebp - 0x148]
push edx
mov ecx, dword [ebx + 0xc]
push ecx
call sub.KERNEL32.DLL_FindFirstFileA
mov edi, eax
mov dword [ebx + 4], edi
cmp edi, 0xffffffff
setne al
and eax, 1
jmp 0x41356a
lea edx, [ebp - 0x148]
push edx
mov ecx, dword [ebx + 4]
push ecx
call sub.KERNEL32.DLL_FindNextFileA
test eax, eax
jne 0x413580
call fcn.00416498
test eax, eax
jne 0x41357b
xor eax, eax
jmp 0x4135f1
or eax, 0xffffffff
jmp 0x4135f1
mov eax, dword [ebp - 0x148]
test al, 0x16
je 0x413594
mov edx, dword [ebx + 8]
and edx, eax
test dl, 0x16
je 0x413526
mov ecx, dword [ebp - 0x148]
mov dword [esi + 8], ecx
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0x134]
push edx
call sub.KERNEL32.DLL_FileTimeToLocalFileTime
lea ecx, [esi + 0xc]
push ecx
lea eax, [esi + 0xe]
push eax
lea edx, [ebp - 8]
push edx
call sub.KERNEL32.DLL_FileTimeToDosDateTime
mov ecx, dword [ebp - 0x128]
xor eax, eax
mov dword [esi + 4], ecx
add esi, 0x10
push esi
lea edi, [ebp - 0x11c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x415f3c
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push eax
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
test eax, eax
jne 0x415f57
call fcn.00416498
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x415f5c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
lea eax, [ebp - 0x104]
push eax
push 0x104
call sub.KERNEL32.DLL_GetCurrentDirectoryA
cmp byte [ebp - 0x104], 0x61
jl 0x415f8b
movsx edx, byte [ebp - 0x104]
add edx, 0xffffffa0
jmp 0x415f95
movsx edx, byte [ebp - 0x104]
add edx, 0xffffffc0
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov esp, ebp
pop ebp
ret
Function at 0x415fa0
Capabilities:
Get disk information
Query environment variable
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef8
xor eax, eax
lea ecx, [ebp - 4]
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
lea edi, [ebp - 0x108]
mov dword [esi], eax
mov byte [ebp - 4], 0x3d
mov dl, byte [ebp + 8]
add dl, 0x40
mov byte [ebp - 3], dl
mov byte [ebp - 2], 0x3a
mov byte [ebp - 1], 0
push 0x104
push edi
push ecx
call sub.KERNEL32.DLL_GetEnvironmentVariableA
test eax, eax
jne 0x416006
mov al, byte [ebp - 3]
mov byte [edi], al
mov byte [edi + 1], 0x3a
mov byte [edi + 2], 0x5c
mov byte [edi + 3], 0
push edi
lea edx, [ebp - 4]
push edx
call sub.KERNEL32.DLL_SetEnvironmentVariableA
dec eax
je 0x416006
call fcn.004164b8
jmp 0x416041
push edi
call sub.KERNEL32.DLL_SetCurrentDirectoryA
dec eax
je 0x416016
call fcn.004164b8
jmp 0x416041
mov byte [edi + 1], 0x3a
mov byte [edi + 2], 0x5c
mov byte [edi + 3], 0
mov byte [edi], 0x41
jmp 0x41603c
push edi
call sub.KERNEL32.DLL_GetDriveTypeA
mov ebx, eax
test eax, eax
je 0x41603a
cmp ebx, 1
je 0x41603a
inc dword [esi]
inc byte [edi]
cmp byte [edi], 0x5a
jle 0x416027
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x416048
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x104
call fcn.0041a2d4
pop ecx
mov ebx, eax
test eax, eax
jne 0x41606c
xor eax, eax
jmp 0x416115
lea edx, [ebp - 4]
push edx
push ebx
push 0x104
mov ecx, dword [ebp + 0xc]
push ecx
call sub.KERNEL32.DLL_GetFullPathNameA
mov esi, eax
test esi, esi
je 0x41608d
cmp esi, 0x104
jb 0x416098
push ebx
call fcn.0041a1cc
pop ecx
xor eax, eax
jmp 0x416115
cmp byte [ebx + 1], 0x3a
jne 0x4160c8
mov dl, byte [ebx]
lea ecx, [ebp - 8]
mov byte [ebp - 8], dl
mov byte [ebp - 7], 0x3a
mov byte [ebp - 6], 0x5c
mov byte [ebp - 5], 0
push ecx
call sub.KERNEL32.DLL_GetDriveTypeA
cmp eax, 2
jae 0x4160c8
push ebx
call fcn.0041a1cc
pop ecx
xor eax, eax
jmp 0x416115
inc esi
test edi, edi
je 0x41610b
cmp esi, dword [ebp + 0x10]
jbe 0x4160dd
push ebx
call fcn.0041a1cc
pop ecx
xor eax, eax
jmp 0x416115
push edi
mov esi, edi
xor eax, eax
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
push ebx
call fcn.0041a1cc
pop ecx
mov eax, edi
jmp 0x416115
push esi
push ebx
call fcn.0041a768
add esp, 8
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret
Function at 0x41611c
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
test al, al
jne 0x416131
xor eax, eax
jmp 0x416145
add al, 0x40
mov byte [ebp - 4], al
lea eax, [ebp - 4]
mov byte [ebp - 3], 0x3a
mov byte [ebp - 2], 0x5c
mov byte [ebp - 1], 0
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x10]
push edx
lea edx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 8]
push edx
push ecx
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
dec eax
je 0x416167
mov dword [ebx + 0xc], 0xffffffff
jmp 0x41617e
mov eax, dword [ebp - 0x14]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx], eax
mov edx, dword [ebp - 8]
mov dword [ebx + 0xc], edx
mov ecx, dword [ebp - 0xc]
mov dword [ebx + 8], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x416734
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
cmp dword [ebp + 0xc], 1
mov esi, dword [ebp + 8]
jne 0x41675f
lea eax, [ebp + 0x10]
add eax, 4
mov ebx, dword [eax - 4]
push ebx
push esi
call sub.KERNEL32.DLL_SetFileAttributesA
test eax, eax
jne 0x416773
call fcn.004164b8
jmp 0x416775
push esi
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x416773
call fcn.004164b8
jmp 0x416775
mov eax, ebx
pop esi
pop ebx
pop ebp
ret
Function at 0x4169d4
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
test byte [ebp + 0xd], 0xc0
jne 0x4169f3
mov eax, dword [0x421c38]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x416a00
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x416a2d
je 0x416a3f
sub ecx, 0x100
je 0x416a4d
sub ecx, 0x100
je 0x416a54
sub ecx, 0x100
je 0x416a46
jmp 0x416a5b
sub ecx, 0x600
je 0x416a54
sub ecx, 0x100
je 0x416a3f
jmp 0x416a5b
mov edi, 1
jmp 0x416a60
mov edi, 2
jmp 0x416a60
mov edi, 4
jmp 0x416a60
mov edi, 5
jmp 0x416a60
mov edi, 3
test byte [ebp + 0xd], 1
je 0x416a87
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x4221c0]
test al, 0x80
je 0x416a80
mov ebx, 0x80
jmp 0x416a99
mov ebx, 1
jmp 0x416a99
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x416a99
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x416aab
je 0x416ab4
dec eax
je 0x416abd
jmp 0x416ac6
mov dword [ebp - 4], 0x80000000
jmp 0x416ad5
mov dword [ebp - 4], 0x40000000
jmp 0x416ad5
mov dword [ebp - 4], 0xc0000000
jmp 0x416ad5
push 1
call fcn.00416454
pop ecx
mov ebx, eax
jmp 0x416bc1
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x416af1
sub eax, 0x10
je 0x416af8
sub eax, 0x10
je 0x416b01
sub eax, 0x10
je 0x416b0a
jmp 0x416b0a
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x416b11
mov dword [ebp - 8], 1
jmp 0x416b11
mov dword [ebp - 8], 2
jmp 0x416b11
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x416b7a
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x416b6f
test byte [ebp + 0xd], 1
mov ebx, 0x50
jne 0x416b6f
add ebx, 0xffffffb2
push ebx
call fcn.00416454
pop ecx
mov ebx, eax
jmp 0x416bc1
mov edi, esi
push edi
call fcn.00416944
pop ecx
test eax, eax
je 0x416b8e
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x416b9a
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.004161b0
add esp, 8
mov ebx, eax
inc eax
jne 0x416bc1
push 4
call fcn.00416454
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x41a5b0
Capabilities:
Get memory capacity

Disassembly:
add esp, 0xffffffe0
mov dword [esp], 0x20
push esp
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0xc]
add esp, 0x20
ret
Function at 0x41aa0c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
cmp dword [0x422b04], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x41aac4
cmp byte [0x41d0fe], 0
je 0x41aa7e
push 0x50
lea eax, [ebp - 0x54]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x54]
push edx
call fcn.004199a4
add esp, 8
mov ebx, eax
test eax, eax
jne 0x41aa67
push 0x3a
lea edx, [ebp - 0x54]
push edx
call fcn.004199a4
add esp, 8
mov ebx, eax
test eax, eax
jne 0x41aa67
lea ebx, [ebp - 0x54]
jmp 0x41aa68
inc ebx
call fcn.0041a9c4
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x41aae5
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x422b08
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.0041009c
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x422b0b
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x41aae5
cmp dword [0x422b04], 0xffffffff
je 0x41aae5
mov eax, dword [0x422b04]
test eax, eax
je 0x41aae5
cmp byte [eax], 0
je 0x41aae5
push esi
push eax
call fcn.0041ab74
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4011a0
Capabilities:
Create thread
Resume thread

Disassembly:
push esi
push edi
push 0x74
push 1
xor edi, edi
call fcn.004017b0
mov esi, eax
add esp, 8
test esi, esi
je 0x4011ff
push esi
call fcn.00401670
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], ecx
push esi
push 4
push esi
push 0x401220
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
mov dword [esi + 4], edi
je 0x4011f7
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x40121b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call fcn.004015a0
add esp, 4
test edi, edi
je 0x401215
push edi
call fcn.00401500
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
ret
mov eax, edi
pop edi
pop esi
ret

Function at 0x401320
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405010
push 0x401d18
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 [0x4089cc], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x4089c8], ecx
shl ecx, 8
add ecx, edx
mov dword [0x4089c4], ecx
shr eax, 0x10
mov dword [0x4089c0], eax
call fcn.00402870
test eax, eax
jne 0x40138a
push 0x1c
call fcn.004014d0
add esp, 4
call fcn.00401610
test eax, eax
jne 0x40139d
push 0x10
call fcn.004014d0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00402660
call fcn.00402650
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x409e10], eax
call fcn.004021f0
mov dword [0x4089b0], eax
test eax, eax
je 0x4013d0
mov eax, dword [0x409e10]
test eax, eax
jne 0x4013da
push 0xffffffffffffffff
call fcn.00401890
add esp, 4
call fcn.00401f40
call fcn.00401e50
call fcn.00401860
mov esi, dword [0x409e10]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4014b9
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x401421
test al, al
je 0x401421
and eax, 0xff
push eax
call fcn.00401df0
add esp, 4
test eax, eax
je 0x4013fb
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4013fb
cmp byte [esi], 0x22
jne 0x40142a
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40143a
cmp al, 0x20
ja 0x40143a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40142a
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40145b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x401460
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.00401890
jmp 0x40149e
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 0x40142a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4014b9
Function at 0x401610
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00402ad0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4061e8], eax
je 0x401668
push 0x74
push 1
call fcn.004017b0
mov esi, eax
add esp, 8
test esi, esi
je 0x401668
mov eax, dword [0x4061e8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x401668
push esi
call fcn.00401670
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 0x401690
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 [0x4061e8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4016fe
push 0x74
push 1
call fcn.004017b0
mov esi, eax
add esp, 8
test esi, esi
je 0x4016f4
mov ecx, dword [0x4061e8]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4016f4
push esi
call fcn.00401670
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.004014d0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

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

Disassembly:
mov eax, dword [0x4061e8]
cmp eax, 0xffffffff
je 0x4017ac
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x401734
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x40179d
mov eax, dword [esi + 0x24]
test eax, eax
je 0x401744
push eax
call fcn.004015a0
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x401754
push eax
call fcn.004015a0
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x401764
push eax
call fcn.004015a0
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x401774
push eax
call fcn.004015a0
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x401784
push eax
call fcn.004015a0
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x401794
push eax
call fcn.004015a0
add esp, 4
push esi
call fcn.004015a0
add esp, 4
mov eax, dword [0x4061e8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x4018d0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00401990
mov eax, dword [0x4089fc]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x4018f4
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 [0x4089f8], 1
mov byte [0x4089f4], bl
jne 0x40194e
mov ecx, dword [0x409e08]
test ecx, ecx
je 0x40193c
mov esi, dword [0x409e04]
sub esi, 4
cmp esi, ecx
jb 0x40193c
mov eax, dword [esi]
test eax, eax
je 0x401935
call eax
mov ecx, dword [0x409e08]
sub esi, 4
cmp esi, ecx
jae 0x401927
push 0x40601c
push 0x406014
call fcn.004019b0
add esp, 8
push 0x406024
push 0x406020
call fcn.004019b0
add esp, 8
test ebx, ebx
je 0x40196d
call fcn.004019a0
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x4089fc], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4021f0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x408b08]
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 0x402232
call edi
mov esi, eax
test esi, esi
je 0x40221c
mov eax, 1
jmp 0x40222d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40233f
mov eax, 2
mov dword [0x408b08], eax
cmp eax, 1
jne 0x4022d2
test esi, esi
jne 0x40224b
call edi
mov esi, eax
test esi, esi
je 0x40233f
cmp word [esi], 0
mov eax, esi
je 0x402265
add eax, 2
cmp word [eax], 0
jne 0x402253
add eax, 2
cmp word [eax], 0
jne 0x402253
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 0x4022c4
push edi
call fcn.004033c0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4022c4
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 0x4022b6
push ebx
call fcn.004015a0
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 0x40233f
test ebx, ebx
jne 0x4022e3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40233f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4022fb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4022eb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4022eb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004033c0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40231d
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