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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x70
mov eax, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov eax, esp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x4027a0
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
add eax, dword [ecx + 0x3c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x78]
add eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
add eax, dword [ecx + 0x20]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
mov word [ebp - 0x42], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x30]
jae 0x40215f
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x50]
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp - 0x68]
mov dword [esp], eax
call fcn.00402800
sub esp, 4
cmp dword [ebp + 8], 0
jbe 0x402124
cmp dword [ebp + 0xc], 3
jbe 0x402124
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x10], 0
mov eax, esp
lea ecx, [ebp - 0x68]
mov dword [eax], ecx
mov dword [eax + 4], 0x14d
call fcn.00401e30
mov dword [ebp - 0x74], eax
jmp 0x4020c3
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x40211f
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp + 0xc]
jne 0x40211a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
add eax, dword [ecx + 0x24]
mov ecx, dword [ebp - 0x48]
shl ecx, 1
add eax, ecx
mov ax, word [eax]
mov word [ebp - 0x42], ax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
add eax, dword [ecx + 0x1c]
movzx ecx, word [ebp - 0x42]
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x70], 2
jmp 0x402134
jmp 0x40211f
jmp 0x402124
mov eax, dword [ebp - 0x2c]
add eax, 4
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x70], 0
lea ecx, [ebp - 0x68]
call fcn.004028c0
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x402151
jmp 0x40214c
jmp 0x40215f
mov eax, dword [ebp - 0x4c]
add eax, 1
mov dword [ebp - 0x4c], eax
jmp 0x402058
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x38]
add eax, ecx
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x70
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4021a0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x574c00], eax
pop esi
pop edi
pop ebp
ret
Function at 0x407872
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4078b1
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4078b1
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4078b1
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4078b1
cmp dword [ecx + 0x74], 0xe
jbe 0x4078b1
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x415126
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4151c3
push ebx
push esi
call fcn.004150ef
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00415038
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x415170
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4151c2
push edi
push eax
call fcn.00413e45
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x415190
call fcn.00413e0b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4151c1
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00415038
add esp, 0x20
test eax, eax
jne 0x4151af
push edi
call fcn.00413e0b
jmp 0x4151b7
push ebx
call fcn.00413e0b
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4159ef
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x425b20
push 0x425b18
push str.FlsAlloc
push 0x1e
call fcn.0041585c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x415a23
push dword [ebp + 8]
mov ecx, esi
call dword [0x422158]
call esi
jmp 0x415a29
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x415a6d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x425b30
push 0x425b28
push str.FlsGetValue
push 0x20
call fcn.0041585c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x415aa4
push dword [ebp + 8]
mov ecx, esi
call dword [0x422158]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4195fc
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041929e

Function at 0x419607
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041942d
Function at 0x41ae16
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00420e90
mov eax, dword [0x430244]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00419277
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41ae58
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41afb4
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00420ec0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x431b50]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0041b23c
mov ecx, dword [esi*4 + 0x431b50]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x41afad
cmp eax, dword [edi + ecx + 0x24]
jne 0x41afad
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41afad
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041b23c
add esp, 0x14
test edx, edx
jl 0x41afad
jg 0x41af23
test eax, eax
jb 0x41afad
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41afad
jl 0x41af3d
cmp dword [ebp - 0x1008], eax
ja 0x41afad
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41af5b
test ebx, ebx
je 0x41af94
cmp ecx, edi
jae 0x41af94
mov al, byte [ecx]
cmp al, 0xd
jne 0x41af75
lea eax, [edi - 1]
cmp ecx, eax
jae 0x41af81
cmp byte [ecx + 1], 0xa
jne 0x41af81
inc ecx
jmp 0x41af81
movzx eax, al
movsx eax, byte [eax + 0x430b60]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41af5b
cmp edx, ebx
jne 0x41af5b
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x41afb2
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00407cbc
leave
ret
Function at 0x41ed4e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x431b50]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41ed8e
cmp byte [ebx], 0xa
jne 0x41ed8e
or byte [eax + edi + 0x28], 4
jmp 0x41ed93
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x41ee91
mov al, byte [edx]
cmp al, 0x1a
je 0x41ee73
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x41edc2
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41ede7
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x41edf1
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x41eda4
jmp 0x41ee91
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ee6e
cmp dword [ebp - 0xc], 0
je 0x41ee6e
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x431b50]
test byte [eax + edi + 0x28], 0x48
je 0x41ee48
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41ee33
mov byte [esi], dl
jmp 0x41ee44
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x431b50]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41ee91
cmp byte [ebp - 1], 0xa
jne 0x41ee57
cmp esi, ebx
jne 0x41ee57
mov byte [esi], 0xa
jmp 0x41ee90
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041b25a
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41ee91
mov byte [esi], 0xd
jmp 0x41ee90
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x431b50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41ee8d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41ee91
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41ee9a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x431b50]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41eedd
cmp word [esi], dx
jne 0x41eedd
or byte [edi + eax + 0x28], 4
jmp 0x41eee2
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x41f035
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x41f015
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x41ef24
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41ef5a
cmp eax, edx
jae 0x41ef66
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x41eefc
jmp 0x41f035
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41f011
cmp dword [ebp - 0x14], 0
je 0x41f011
mov eax, dword [ebx*4 + 0x431b50]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41efe9
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x41efb2
mov word [esi], cx
jmp 0x41efe5
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x431b50]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x431b50]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x431b50]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x41f035
pop ebx
cmp word [ebp - 4], bx
jne 0x41effa
cmp esi, dword [ebp + 0xc]
jne 0x41effa
mov word [esi], bx
jmp 0x41f032
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041b25a
add esp, 0x10
cmp word [ebp - 4], bx
je 0x41f035
push 0xd
jmp 0x41f02e
mov ecx, dword [ebx*4 + 0x431b50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41f02c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41f035
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x420e50
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x420e7d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x420e7d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x9780f0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x166000]
push edi
or ebp, 0xffffffff
jmp 0x978112
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x978119
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x978108
mov eax, 1
add ebx, ebx
jne 0x97812b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x97813c
jne 0x97815b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x97815b
dec eax
add ebx, ebx
jne 0x978148
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x978120
add ebx, ebx
jne 0x978157
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x9781ad
xor ecx, ecx
sub eax, 3
jb 0x978173
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x9781e2
sar eax, 1
mov ebp, eax
jmp 0x97817e
add ebx, ebx
jne 0x97817e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x97814c
inc ecx
add ebx, ebx
jne 0x97818c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x97814c
add ebx, ebx
jne 0x978199
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x97818e
jne 0x9781aa
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x97818e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x9781cc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x9781be
jmp 0x97810e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x9781cc
add edi, ecx
jmp 0x97810e
pop esi
mov edi, esi
mov ecx, 4
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x9781ea
cmp byte [edi], 0x1d
jne 0x9781ea
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x9781ef
lea edi, [esi + 0x574000]
mov eax, dword [edi]
or eax, eax
je 0x978267
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x59183c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x591990]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x97821c
mov ecx, edi
jns 0x97824b
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x591994]
or eax, eax
je 0x978261
mov dword [ebx], eax
add ebx, 4
jmp 0x978239
call dword [esi + 0x5919a4]
mov ebp, dword [esi + 0x591998]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x23f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x97829b
sub esp, 0xffffff80
jmp 0x50e7fc
Function at 0x40632b
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov eax, dword [eax + 4]
test eax, eax
jne 0x40633b
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push esi
push 0x426e60
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x40638f
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 4]
test eax, eax
jne 0x406360
mov eax, 0x41c694
mov ecx, dword [esp + 0x10]
push esi
push 1
add eax, ecx
push dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
push esi
je 0x406388
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
xor eax, eax
jmp 0x406392
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
push 1
pop eax
pop esi
ret 0x10
Function at 0x408bb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x12]
mov word [esp + 0x10], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x10]
push eax
push 0x426f20
push ecx
call dword [sym.imp.MSVCRT.dll_swprintf]
mov edx, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
add esp, 0xc
lea eax, [esp + 0x10]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebp
je 0x408d41
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebp
je 0x408d41
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebp
mov dword [esp + 0x44], eax
je 0x408d41
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
je 0x408d41
mov esi, dword [esp + 0x48]
mov ebp, dword [0x41c690]
mov edi, dword [esi + 4]
test edi, edi
je 0x408c78
mov al, byte [edi - 1]
test al, al
je 0x408c78
cmp al, 0xff
je 0x408c78
push 1
mov ecx, esi
call fcn.00403e6f
mov cl, byte [edi]
xor eax, eax
test cl, cl
je 0x408c6f
mov cl, byte [eax + edi + 1]
inc eax
test cl, cl
jne 0x408c66
push eax
push edi
mov ecx, esi
call fcn.00405489
mov eax, dword [esi + 8]
cmp eax, ebp
jae 0x408c81
mov ebp, eax
test ebp, ebp
jbe 0x408cdc
sub eax, ebp
mov edx, eax
mov eax, dword [esi + 4]
lea ecx, [eax + ebp]
cmp ecx, eax
jae 0x408cb0
lea edi, [ecx + edx]
cmp eax, edi
jae 0x408cb0
add eax, edx
mov ecx, edi
test edx, edx
jbe 0x408cbf
mov edi, edx
mov dl, byte [ecx - 1]
dec ecx
dec eax
dec edi
mov byte [eax], dl
jne 0x408ca4
jmp 0x408cbf
test edx, edx
jbe 0x408cbf
mov edi, edx
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
dec edi
jne 0x408cb6
mov edi, dword [esi + 8]
push 0
sub edi, ebp
mov ecx, esi
push edi
call fcn.004053d3
test al, al
je 0x408cdc
mov eax, dword [esi + 4]
mov dword [esi + 8], edi
mov byte [edi + eax], 0
cmp ebx, 0xfffffffd
jbe 0x408ce7
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [esi + 4]
test eax, eax
je 0x408cf9
mov al, byte [eax - 1]
test al, al
je 0x408cf9
cmp al, 0xff
jne 0x408d0e
mov eax, dword [esi + 0xc]
cmp eax, 0x1f
ja 0x408d05
cmp eax, ebx
jae 0x408d16
push 1
mov ecx, esi
call fcn.00403e6f
push ebx
mov ecx, esi
call fcn.00405510
mov ecx, dword [esp + 0x44]
mov eax, dword [esi + 4]
test ebx, ebx
jbe 0x408d2c
mov edi, ebx
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
dec edi
jne 0x408d23
push ebx
mov ecx, esi
call fcn.00408a60
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x28
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
Function at 0x40cad5
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x41af88
call fcn.004169b0
sub esp, 0x18
mov al, byte [ebp - 0xd]
push ebx
push esi
mov esi, ecx
push 0
lea ecx, [ebp - 0x24]
mov bl, 1
mov byte [ebp - 0x24], al
call fcn.00403e6f
and dword [ebp - 4], 0
mov ecx, esi
call fcn.0040cbd7
test al, al
je 0x40cb50
push edi
mov edi, dword [sym.imp.MSVCRT.dll_rand]
call edi
push 0xb
cdq
pop ecx
idiv ecx
push ecx
push ecx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp qword [esp]
call edi
push 7
cdq
pop ecx
idiv ecx
push ecx
push ecx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp qword [esp]
call edi
push 3
cdq
pop ecx
idiv ecx
push ecx
push ecx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp qword [esp]
call fcn.0040c022
add esp, 0x18
pop edi
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
push 0x3fc
call fcn.0040c849
mov ecx, esi
call fcn.0040c33a
mov esi, eax
test esi, esi
je 0x40cbb7
mov edx, dword [ebp - 0x20]
mov eax, 0x41c694
test edx, edx
mov ecx, eax
je 0x40cb7d
mov ecx, edx
mov ecx, dword [ecx]
cmp ecx, dword [0x41c993]
jne 0x40cbad
test edx, edx
je 0x40cb8d
mov eax, edx
mov ecx, dword [ebp - 0x1c]
push esi
add ecx, 0xfffffffc
push 1
add eax, 4
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, eax
add esp, 0x10
dec ebx
neg ebx
sbb bl, bl
inc bl
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
jmp 0x40cbb9
xor bl, bl
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x24]
call fcn.00403e6f
mov ecx, dword [ebp - 0xc]
mov al, bl
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x40ccaf
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x41afb0
call fcn.004169b0
sub esp, 0x14
mov al, byte [ebp - 0xd]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
lea ecx, [ebp - 0x20]
push ebx
mov byte [ebp - 0x20], al
call fcn.00403e6f
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040cbed
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 0x401
call fcn.0040c849
mov ecx, esi
call fcn.0040c746
mov esi, eax
cmp esi, ebx
je 0x40cd24
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x40cd04
mov eax, 0x41c694
push esi
push 1
push dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, eax
push esi
dec ebx
neg ebx
sbb bl, bl
inc bl
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x20]
call fcn.00403e6f
mov ecx, dword [ebp - 0xc]
mov al, bl
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x40d0cc
Capabilities:
Create thread

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
call dword [sym.imp.MSVCRT.dll_clock]
xor ebx, ebx
mov edi, eax
cmp dword [esi + 0x184], ebx
jne 0x40d123
mov ecx, 0x429538
call fcn.004106f3
cmp eax, 3
jne 0x40d103
test byte [0x429550], 1
je 0x40d103
cmp byte [esi + 0xa5], bl
je 0x40d123
lea eax, [esi + 0x190]
push eax
push ebx
push 0x429538
push 0x4043f3
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x194], eax
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x40d129
Capabilities:
Create thread

Disassembly:
mov eax, 0x41b08d
call fcn.004169b0
sub esp, 0x5c
push ebx
push esi
push edi
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], esp
xor edi, edi
mov esi, ecx
push eax
push edi
push esi
push 0x4023e4
push edi
push edi
mov dword [ebp - 0x18], esi
mov dword [esi + 0x18c], edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 4], edi
call fcn.00415390
mov dword [esi + 0x18c], eax
jmp 0x40d17a
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], edi
je 0x40d19c
push edi
push edi
push dword [0x41c658]
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esi + 0x18c], edi
jne 0x40d20b
push dword [0x4262ec]
lea eax, [ebp - 0x28]
push dword [0x42624c]
push eax
call fcn.00408930
add esp, 0xc
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], 2
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov esi, 0x41c644
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x48], esi
push 1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x68]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::runtime_error_const__]
mov eax, dword [ebp - 0x2c]
push 0x421d48
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x68]
push eax
mov dword [ebp - 0x68], esi
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret