joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401ca0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x422a7b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
push 0x66
mov dword [esp + 0x14], ebx
lea ecx, [edi + 0x74]
call fcn.0041b5b4
mov ecx, edi
call fcn.00402420
push 1
mov ecx, edi
call fcn.004197fc
mov eax, dword [edi + 0x60]
lea ebp, [edi + 0x60]
cmp dword [eax - 8], ebx
je 0x401ee5
lea esi, [edi + 0x5c]
mov ecx, esi
call fcn.004158e9
mov ecx, esi
call fcn.00415932
mov ecx, ebp
call fcn.004158e9
mov ecx, ebp
call fcn.00415932
lea ecx, [esp + 0x14]
call fcn.0041a741
lea ecx, [esp + 0x20]
mov dword [esp + 0x12c], ebx
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push esi
call fcn.0041a751
mov ecx, edi
call fcn.00402540
test eax, eax
je 0x401d87
push esi
call fcn.00403660
add esp, 4
test eax, eax
jne 0x401e19
push 0x5c
lea edx, [esp + 0x14]
push esi
push edx
call fcn.0041538c
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x130], 1
call fcn.0041a985
mov byte [esp + 0x12c], bl
lea ecx, [esp + 0x10]
jmp 0x401e14
push 0x5c
mov ecx, esi
call fcn.004155ba
cmp eax, ebx
jne 0x401db5
lea eax, [esp + 0x20]
lea ecx, [esp + 0x18]
push eax
call fcn.0041a8fa
mov ebx, 1
mov dword [esp + 0x10], ebx
mov byte [esp + 0x12c], 2
jmp 0x401dd6
lea ecx, [esp + 0x1c]
push eax
push ecx
mov ecx, esi
call fcn.00415519
mov ebx, 2
mov dword [esp + 0x10], ebx
mov dword [esp + 0x12c], 3
push eax
lea ecx, [esp + 0x18]
call fcn.0041a985
test bl, 2
mov dword [esp + 0x12c], 2
je 0x401e00
and ebx, 0xfffffffd
lea ecx, [esp + 0x1c]
mov dword [esp + 0x10], ebx
call fcn.0041a88c
test bl, 1
mov dword [esp + 0x12c], 0
je 0x401e19
lea ecx, [esp + 0x18]
call fcn.0041a88c
lea edx, [esp + 0x14]
push edx
call fcn.00403660
add esp, 4
test eax, eax
jne 0x401e35
push 0x5c
lea ecx, [esp + 0x18]
call fcn.0041ac2a
mov eax, dword [ebp]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x401ed1
push ebp
call fcn.00403660
add esp, 4
test eax, eax
jne 0x401e59
push 0x5c
mov ecx, ebp
call fcn.0041ac2a
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp]
push ecx
push edx
call fcn.00406820
add esp, 8
test eax, eax
jne 0x401ed1
lea ecx, [esp + 0x10]
call fcn.0041a741
push 0x78
lea ecx, [esp + 0x14]
mov byte [esp + 0x130], 4
call fcn.0041b5b4
mov eax, dword [esp + 0x10]
push 0
push 0
push eax
call fcn.0041e972
mov ecx, ebp
call fcn.0041a817
push 0
mov ecx, edi
call fcn.004197fc
lea ecx, [esp + 0x10]
mov byte [esp + 0x12c], 0
call fcn.0041a88c
lea ecx, [esp + 0x14]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0041a88c
xor eax, eax
jmp 0x401eea
lea ecx, [esp + 0x14]
mov dword [esp + 0x12c], 0xffffffff
call fcn.0041a88c
mov eax, 1
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x120
ret
Function at 0x402540
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x422b20
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], ebx
call fcn.0041b7d3
mov eax, dword [esp + 0x2c]
push ebx
push ebx
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 1
call fcn.0041b952
test eax, eax
jne 0x4025d6
push ecx
lea edx, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0xc], esp
push edx
call fcn.0041a751
mov ecx, esi
call fcn.00402f60
test eax, eax
mov byte [esp + 0x24], bl
lea ecx, [esp + 0xc]
je 0x4025e7
call fcn.0041b873
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call fcn.0041a88c
mov eax, 1
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x20
ret 4
lea ecx, [esp + 0xc]
call fcn.0041bb78
mov byte [esp + 0x24], bl
lea ecx, [esp + 0xc]
call fcn.0041b873
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call fcn.0041a88c
mov ecx, dword [esp + 0x1c]
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 4
Function at 0x403080
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x422ce0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], ebx
call fcn.0041b7d3
mov eax, dword [esp + 0x2c]
push ebx
push ebx
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 1
call fcn.0041b952
test eax, eax
jne 0x403113
push ecx
lea edx, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0xc], esp
push edx
call fcn.0041a751
mov ecx, esi
call fcn.00402f60
test eax, eax
mov byte [esp + 0x24], bl
lea ecx, [esp + 0xc]
jne 0x403124
call fcn.0041b873
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call fcn.0041a88c
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x20
ret 4
lea ecx, [esp + 0xc]
call fcn.0041bb78
mov byte [esp + 0x24], bl
lea ecx, [esp + 0xc]
call fcn.0041b873
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call fcn.0041a88c
mov ecx, dword [esp + 0x1c]
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 4

Function at 0x4034c0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x422d75
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push esi
mov esi, ecx
xor ebx, ebx
lea ecx, [esp + 8]
mov dword [esp + 0xc], ebx
call fcn.0041a741
push 0x81
lea ecx, [esp + 0xc]
mov dword [esp + 0x140], 1
call fcn.0041b5b4
cmp esi, ebx
jne 0x403511
mov dword [esp + 0x10], ebx
jmp 0x403518
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x10], eax
mov edx, dword [esp + 8]
lea ecx, [esp + 0x30]
mov dword [esp + 0x18], ecx
lea eax, [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], ebx
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov esi, dword [esp + 0x144]
lea edx, [esp + 0x30]
push edx
mov ecx, esi
call fcn.0041a8fa
mov dword [esp + 0xc], 1
lea ecx, [esp + 8]
mov byte [esp + 0x13c], bl
call fcn.0041a88c
mov ecx, dword [esp + 0x134]
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x138
ret 4
Function at 0x403e20
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x422e78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
xor ebx, ebx
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], ebx
call fcn.0041b7d3
push str._DWGCODEPAGE
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 1
call fcn.0041a8fa
lea ecx, [esp + 8]
mov byte [esp + 0x30], 2
call fcn.0041a741
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 3
call fcn.0041a741
mov eax, dword [esp + 0x38]
push ebx
push 0x10
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 4
call fcn.0041b952
test eax, eax
jne 0x403eed
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 3
call fcn.0041a88c
lea ecx, [esp + 8]
mov byte [esp + 0x30], 2
call fcn.0041a88c
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call fcn.0041a88c
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], bl
call fcn.0041b873
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041a88c
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x2c
ret
lea ecx, [esp + 0x18]
call fcn.0041bc57
push eax
lea ecx, [esp + 0xc]
call fcn.0041ac57
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.0041bc57
mov edx, dword [esp + 0x18]
push eax
push esi
lea ecx, [esp + 0x20]
call dword [edx + 0x3c]
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.0041bc57
cmp esi, eax
je 0x403f36
or esi, 0xffffffff
lea ecx, [esp + 8]
push esi
call fcn.0041aca6
jmp 0x403f80
or esi, 0xffffffff
lea ecx, [esp + 8]
push esi
call fcn.0041aca6
lea eax, [esp + 0x10]
lea ecx, [esp + 8]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.004042e0
add esp, 0xc
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x34], 5
call fcn.0041a985
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 4
call fcn.0041a88c
mov eax, dword [esp + 0xc]
cmp dword [eax - 8], ebx
jne 0x403fe0
lea ecx, [esp + 0x18]
call fcn.0041bb78
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 3
call fcn.0041a88c
lea ecx, [esp + 8]
mov byte [esp + 0x30], 2
call fcn.0041a88c
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call fcn.0041a88c
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], bl
call fcn.0041b873
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], esi
call fcn.0041a88c
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x2c
ret
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call fcn.00404460
add esp, 0xc
mov ecx, dword [esp + 0x3c]
push eax
mov byte [esp + 0x34], 6
call fcn.0041a985
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 4
call fcn.0041a88c
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 3
call fcn.0041a88c
lea ecx, [esp + 8]
mov byte [esp + 0x30], 2
call fcn.0041a88c
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call fcn.0041a88c
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], bl
call fcn.0041b873
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], esi
call fcn.0041a88c
mov ecx, dword [esp + 0x28]
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x2c
ret
Function at 0x404810
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x422fd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], ebx
call fcn.0041b7d3
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 1
call fcn.0041a741
mov eax, dword [esp + 0x38]
push ebx
push ebx
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 2
mov byte [esp + 0x22], bl
call fcn.0041b952
test eax, eax
je 0x4048b7
mov edx, dword [esp + 0x18]
push ebx
push ebx
lea ecx, [esp + 0x20]
call dword [edx + 0x30]
lea eax, [esp + 0x10]
push 6
push eax
lea ecx, [esp + 0x20]
call fcn.0041ba7a
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x10]
call fcn.0041a9d4
xor edi, edi
mov esi, 0x42a5d8
mov edx, dword [esi]
mov eax, dword [esp + 0xc]
push edx
push eax
call fcn.00406b90
add esp, 8
test eax, eax
je 0x4048fa
add esi, 0xc
inc edi
cmp esi, 0x42a6ec
jl 0x404897
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 1
call fcn.0041a88c
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], bl
call fcn.0041b873
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041a88c
mov eax, 0x7ffe
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x28
ret
lea ecx, [edi + edi*2]
mov byte [esp + 0x30], 1
mov esi, dword [ecx*4 + 0x42a5dc]
lea ecx, [esp + 0xc]
call fcn.0041a88c
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], bl
call fcn.0041b873
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041a88c
mov ecx, dword [esp + 0x28]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x28
ret

Function at 0x405400
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
mov ecx, eax
dec eax
test ecx, ecx
jle 0x40544a
mov ecx, dword [0x42f4d4]
mov edx, dword [0x42f4d8]
push edi
push esi
mov esi, dword [esp + 0xc]
lea edi, [eax + 1]
xor eax, eax
mov al, byte [esi]
xor eax, ecx
xor ecx, ecx
mov cl, byte [eax + 0x42aaf8]
xor ecx, edx
xor edx, edx
mov dl, byte [eax + 0x42abf8]
inc esi
dec edi
mov dword [0x42f4d4], ecx
mov dword [0x42f4d8], edx
jne 0x405420
pop esi
pop edi
ret
Function at 0x4069b0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x426840
push 0x40b2d8
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 [0x431ec0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x431ebc], ecx
shl ecx, 8
add ecx, edx
mov dword [0x431eb8], ecx
shr eax, 0x10
mov dword [0x431eb4], eax
call fcn.0040b290
test eax, eax
jne 0x406a1a
push 0x1c
call fcn.00406b60
add esp, 4
call fcn.0040a060
test eax, eax
jne 0x406a2d
push 0x10
call fcn.00406b60
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b080
call fcn.00408f80
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4334d0], eax
call fcn.0040af20
mov dword [0x431ea4], eax
test eax, eax
je 0x406a60
mov eax, dword [0x4334d0]
test eax, eax
jne 0x406a6a
push 0xffffffffffffffff
call fcn.00407ef0
add esp, 4
call fcn.0040ac70
call fcn.0040ab80
call fcn.00407ec0
mov esi, dword [0x4334d0]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x406b49
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x406ab1
test al, al
je 0x406ab1
and eax, 0xff
push eax
call fcn.0040ab20
add esp, 4
test eax, eax
je 0x406a8b
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406a8b
cmp byte [esi], 0x22
jne 0x406aba
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x406aca
cmp al, 0x20
ja 0x406aca
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406aba
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x406aeb
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x406af0
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.00407ef0
jmp 0x406b2e
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 0x406aba
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406b49

Function at 0x407f30
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00407ff0
mov eax, dword [0x431ef0]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x407f54
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 [0x431eec], 1
mov byte [0x431ee8], bl
jne 0x407fae
mov ecx, dword [0x4334c8]
test ecx, ecx
je 0x407f9c
mov esi, dword [0x4334c4]
sub esi, 4
cmp esi, ecx
jb 0x407f9c
mov eax, dword [esi]
test eax, eax
je 0x407f95
call eax
mov ecx, dword [0x4334c8]
sub esi, 4
cmp esi, ecx
jae 0x407f87
push 0x42a090
push 0x42a088
call fcn.00408010
add esp, 8
push 0x42a09c
push 0x42a094
call fcn.00408010
add esp, 8
test ebx, ebx
je 0x407fcd
call fcn.00408000
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x431ef0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x40a060
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.0040a430
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x42c170], eax
je 0x40a0b8
push 0x74
push 1
call fcn.0040dc30
mov esi, eax
add esp, 8
test esi, esi
je 0x40a0b8
mov eax, dword [0x42c170]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a0b8
push esi
call fcn.0040a0c0
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 0x40a0e0
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 [0x42c170]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40a14e
push 0x74
push 1
call fcn.0040dc30
mov esi, eax
add esp, 8
test esi, esi
je 0x40a144
mov ecx, dword [0x42c170]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a144
push esi
call fcn.0040a0c0
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.00406b60
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x40af20
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4321d0]
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 0x40af62
call edi
mov esi, eax
test esi, esi
je 0x40af4c
mov eax, 1
jmp 0x40af5d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b06f
mov eax, 2
mov dword [0x4321d0], eax
cmp eax, 1
jne 0x40b002
test esi, esi
jne 0x40af7b
call edi
mov esi, eax
test esi, esi
je 0x40b06f
cmp word [esi], 0
mov eax, esi
je 0x40af95
add eax, 2
cmp word [eax], 0
jne 0x40af83
add eax, 2
cmp word [eax], 0
jne 0x40af83
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 0x40aff4
push edi
call fcn.004075a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40aff4
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 0x40afe6
push ebx
call fcn.00407670
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 0x40b06f
test ebx, ebx
jne 0x40b013
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b06f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40b02b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b01b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b01b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004075a0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40b04d
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 0x40b3f0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x42c2f0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40b414
add eax, 8
inc ebp
cmp eax, 0x42c380
jb 0x40b405
cmp ecx, dword [ebp*8 + 0x42c2f0]
jne 0x40b5bb
mov eax, dword [0x431eac]
cmp eax, 1
je 0x40b57d
test eax, eax
jne 0x40b440
cmp dword [0x42be1c], 1
je 0x40b57d
cmp ecx, 0xfc
je 0x40b5bb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b47b
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 0x40b4c4
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 0x426cf0
add ebx, ecx
push ebx
call fcn.0040eb40
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, 0x426cd0
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 + 0x42c2f4]
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.0040ed40
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4333c0]
test eax, eax
je 0x40b58e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x40b598
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x42c2f4]
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
Function at 0x40c6c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40c6ec
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x4333c0]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x40c727
push 2
push ebp
push ecx
call fcn.0040c950
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40c889
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40c7d1
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40c782
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40c76f
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40c752
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c87a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40c7cd
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40c74e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40c869
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40c825
cmp eax, 5
jne 0x40c80e
call fcn.00409010
mov dword [eax], 9
call fcn.00409020
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00408f90
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40c845
cmp byte [ebp], 0x1a
jne 0x40c845
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.00409010
mov dword [eax], 0x1c
call fcn.00409020
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40c7cd
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c8ba
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40c7d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40c7d1