joyce8/EMBER2024-capa huggingface dataset:
Function at 0x410fd4
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x41c1a8
call fcn.00412024
mov edi, 0x94
mov eax, edi
call fcn.004102b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x420d9c], ecx
mov eax, dword [esi + 4]
mov dword [0x420da8], eax
mov edx, dword [esi + 8]
mov dword [0x420dac], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x420da0], esi
cmp ecx, 2
je 0x411034
or esi, 0x8000
mov dword [0x420da0], esi
shl eax, 8
add eax, edx
mov dword [0x420da4], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x41106d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41106d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x411085
cmp eax, 0x20b
je 0x411072
mov dword [ebp - 0x1c], edi
jmp 0x411099
cmp dword [ecx + 0x84], 0xe
jbe 0x41106d
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x411093
cmp dword [ecx + 0x74], 0xe
jbe 0x41106d
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00412e9a
pop ecx
test eax, eax
jne 0x4110ad
push 0x1c
call fcn.00410fb0
pop ecx
call fcn.00411c5e
test eax, eax
jne 0x4110be
push 0x10
call fcn.00410fb0
pop ecx
call fcn.004142e2
mov dword [ebp - 4], edi
call fcn.004160d2
test eax, eax
jge 0x4110d7
push 0x1b
call fcn.00410f8b
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [0x422624], eax
call fcn.00415fb0
mov dword [0x420de0], eax
call fcn.00415f0e
test eax, eax
jge 0x4110fd
push 8
call fcn.00410f8b
pop ecx
call fcn.00415cdb
test eax, eax
jge 0x41110e
push 9
call fcn.00410f8b
pop ecx
push 1
call fcn.00410882
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x411124
push eax
call fcn.00410f8b
pop ecx
mov eax, dword [0x420dbc]
mov dword [0x420dc0], eax
push eax
push dword [0x420db4]
push dword [0x420db0]
call fcn.00401280
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x411153
push esi
call fcn.004109af
call fcn.004109d1
jmp 0x411185
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.0041205f
ret
Function at 0x414b3e
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004102b0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x414bd9
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x420d9c]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x414bd9
cmp eax, 1
je 0x414bfa
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x414bd9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x414ba6
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x414bd5
xor eax, eax
inc eax
jmp 0x414c19
cmp edi, eax
jae 0x414bdd
xor eax, eax
jmp 0x414c19
cmp eax, esi
jae 0x414be4
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov eax, dword [0x420d9c]
jmp 0x414bfd
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x415b2a
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x420070]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4209f0]
je 0x415b61
inc eax
cmp eax, 0x13
jb 0x415b52
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4209f0]
jne 0x415c84
mov eax, dword [0x420de8]
cmp eax, 1
je 0x415c5f
cmp eax, edx
jne 0x415b91
cmp dword [0x420084], 1
je 0x415c5f
cmp ecx, 0xfc
je 0x415c84
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x415bc7
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.0040fec0
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.0040f9f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x415bfb
mov eax, edi
push eax
call fcn.0040f9f0
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x41c2d4
push edi
call fcn.004102f0
add esp, 0x10
push edi
call fcn.0040f9f0
push dword [esi + 0x4209f4]
mov ebx, eax
call fcn.0040f9f0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004102b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040fec0
push edi
push ebx
call fcn.0040fed0
push 0x41c2d0
push ebx
call fcn.0040fed0
push dword [esi + 0x4209f4]
push ebx
call fcn.0040fed0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041690e
add esp, 0x2c
jmp 0x415c84
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x4209f4]
push dword [esi]
call fcn.0040f9f0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.00410051
add ebp, 0x90
leave
ret
Function at 0x4166e5
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x416713
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41671a
cmp ebx, dword [eax + 4]
jae 0x41671a
xor eax, eax
jmp 0x41690a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41672b
xor eax, eax
inc eax
jmp 0x416909
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x416741
cmp ecx, edx
jae 0x416886
cmp dword [eax + 4], 0
je 0x41674a
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x416732
cmp dword [ebp + 8], 0
je 0x41676c
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x416886
cmp eax, esi
jae 0x416886
mov eax, dword [0x421170]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x416791
cmp dword [esi*4 + 0x421178], edi
je 0x41688a
inc esi
cmp esi, eax
jl 0x41677f
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x416906
cmp dword [ebp - 8], 0x1000000
jne 0x416906
test byte [ebp - 0xc], 0xcc
je 0x41680f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x416906
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x416906
cmp word [eax + 0x18], 0x10b
jne 0x416906
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x416906
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41680f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41680f
test byte [ecx + 0x27], 0x80
jne 0x416886
push 1
push 0x4211b8
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
test eax, eax
jne 0x416723
mov ecx, dword [0x421170]
test ecx, ecx
mov edx, ecx
jle 0x416843
lea eax, [ecx*4 + 0x421174]
cmp dword [eax], edi
je 0x416843
dec edx
sub eax, 4
test edx, edx
jg 0x416837
test edx, edx
jne 0x416874
push 0xf
pop ebx
cmp ecx, ebx
jg 0x416850
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x416868
lea eax, [edx*4 + 0x421178]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x416856
cmp ecx, 0x10
jge 0x416874
inc ecx
mov dword [0x421170], ecx
push 0
push 0x4211b8
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
jmp 0x416723
xor eax, eax
jmp 0x416909
test esi, esi
jle 0x416723
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
push 1
push 0x4211b8
call ebx
test eax, eax
jne 0x416723
cmp dword [esi*4 + 0x421178], edi
je 0x4168e0
mov eax, dword [0x421170]
lea esi, [eax - 1]
test esi, esi
jl 0x4168ce
cmp dword [esi*4 + 0x421178], edi
je 0x4168ca
dec esi
jns 0x4168be
test esi, esi
jge 0x4168de
cmp eax, 0x10
jge 0x4168d9
inc eax
mov dword [0x421170], eax
lea esi, [eax - 1]
jmp 0x4168e0
je 0x4168f8
xor ecx, ecx
test esi, esi
jl 0x4168f8
lea eax, [ecx*4 + 0x421178]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4168e6
push 0
push 0x4211b8
call ebx
jmp 0x416723
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41690e
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4211bc], ebx
push esi
push edi
jne 0x41698e
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4169c9
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4211bc], eax
je 0x4169c9
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4211c0], eax
call esi
cmp dword [0x420d9c], 2
mov dword [0x4211c4], eax
jne 0x41698e
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4211cc], eax
je 0x41698e
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4211c8], eax
mov eax, dword [0x4211c8]
test eax, eax
je 0x4169d3
call eax
test eax, eax
je 0x4169ba
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4211cc]
test eax, eax
je 0x4169ba
test byte [ebp - 8], 1
jne 0x4169d3
cmp dword [0x420da8], 4
jb 0x4169cd
or byte [ebp + 0x12], 0x20
jmp 0x4169f2
xor eax, eax
jmp 0x416a02
or byte [ebp + 0x12], 4
jmp 0x4169f2
mov eax, dword [0x4211c0]
test eax, eax
je 0x4169f2
call eax
mov ebx, eax
test ebx, ebx
je 0x4169f2
mov eax, dword [0x4211c4]
test eax, eax
je 0x4169f2
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4211bc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x416b26
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x420070]
xor ecx, ecx
xor eax, ebp
cmp dword [ebp + 0x3b4], ecx
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
jne 0x416b62
xor eax, eax
jmp 0x416ccc
mov eax, dword [ebp + 0x3ac]
push ebx
mov ebx, dword [ebp + 0x3ac]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4212a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x416ba0
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.00418176
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x416c3a
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x416c9d
jmp 0x416bc4
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x416bff
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x416bf0
inc dword [ebp - 0x78]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x6c]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x6c]
cmp dword [ebp - 0x6c], 0x400
jl 0x416bd0
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x416c5e
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x416c67
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x416bc2
jmp 0x416c67
push ecx
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x416c5e
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x416c67
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x416cc7
cmp dword [ebp - 0x68], eax
je 0x416c9a
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x416c8f
call fcn.00414997
mov dword [eax], 9
call fcn.004149a0
mov dword [eax], esi
jmp 0x416cc2
push dword [ebp - 0x68]
call fcn.004149a9
pop ecx
jmp 0x416cc2
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x416caf
cmp byte [edi], 0x1a
jne 0x416caf
xor eax, eax
jmp 0x416cca
call fcn.00414997
mov dword [eax], 0x1c
call fcn.004149a0
and dword [eax], 0
or eax, 0xffffffff
jmp 0x416cca
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.00410051
add ebp, 0x3a4
leave
ret
Function at 0x41825e
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004102b0
mov eax, dword [0x420070]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00416a07
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x418393
push 2
push esi
push dword [ebp + 8]
call fcn.00416a07
add esp, 0xc
cmp eax, ebx
je 0x418393
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x418333
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.004100c0
push 0x8000
push dword [ebp + 8]
call fcn.004186c1
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x4182e9
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.00416b26
add esp, 0xc
cmp eax, 0xffffffff
je 0x418309
sub edi, eax
test edi, edi
jg 0x4182e1
jmp 0x418321
call fcn.004149a0
cmp dword [eax], 5
jne 0x41831e
call fcn.00414997
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.004186c1
pop ecx
pop ecx
jmp 0x41837b
jge 0x41837b
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00416a07
push dword [ebp + 8]
call fcn.0041761b
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x41837b
call fcn.00414997
mov dword [eax], 0xd
call fcn.004149a0
mov edi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.00416a07
add esp, 0xc
mov eax, esi
pop edi
jmp 0x418395
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00410051
leave
ret
Function at 0x4183a3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x418579
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4212a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x418579
test cl, 0x48
je 0x41840e
cmp byte [eax + 5], 0xa
je 0x41840e
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x418460
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x418448
call fcn.00414997
mov dword [eax], 9
call fcn.004149a0
mov dword [eax], esi
jmp 0x418458
cmp eax, 0x6d
je 0x418579
push eax
call fcn.004149a9
pop ecx
or eax, 0xffffffff
jmp 0x41857b
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x418574
test eax, eax
je 0x418487
cmp byte [ebx], 0xa
jne 0x418487
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x418490
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x41856e
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x41855e
cmp al, 0xd
je 0x4184c2
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x418550
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4184dc
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4184d7
add dword [ebp + 0x10], 2
jmp 0x418530
mov dword [ebp + 0x10], eax
jmp 0x41854c
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x418504
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x41854c
cmp dword [ebp - 0xc], 0
je 0x41854c
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x418525
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x418530
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41854f
cmp ebx, dword [ebp + 0xc]
jne 0x418535
cmp byte [ebp - 1], 0xa
jne 0x418535
mov byte [ebx], 0xa
jmp 0x41854f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418176
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x418550
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4184a6
jmp 0x41856e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x41856e
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x41857b
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x418b81
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x418b9a
or eax, 0xffffffff
jmp 0x418bfb
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 8], esi
je 0x418bf7
push 0x3d
push esi
call fcn.00418d82
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x418bf7
cmp esi, eax
je 0x418bf7
xor ecx, ecx
cmp byte [eax + 1], cl
mov eax, dword [0x420dbc]
sete cl
cmp eax, dword [0x420dc0]
mov dword [ebp - 4], ecx
jne 0x418bdd
mov edi, eax
call fcn.00418b20
mov dword [0x420dbc], eax
cmp eax, ebx
jne 0x418c36
cmp dword [ebp + 0xc], ebx
je 0x418bff
cmp dword [0x420dc4], ebx
je 0x418bff
call fcn.004185ce
test eax, eax
je 0x418c36
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
je 0x418c08
xor eax, eax
jmp 0x418bfa
push 4
call fcn.004101c7
cmp eax, ebx
pop ecx
mov dword [0x420dbc], eax
je 0x418bf7
mov dword [eax], ebx
cmp dword [0x420dc4], ebx
jne 0x418c36
push 4
call fcn.004101c7
cmp eax, ebx
pop ecx
mov dword [0x420dc4], eax
je 0x418bf7
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
mov ebx, dword [0x420dbc]
sub edi, esi
push esi
call fcn.00418ad3
mov edi, eax
test edi, edi
pop ecx
jl 0x418c9d
cmp dword [ebx], 0
je 0x418c9d
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.004101d9
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x418c7d
mov ecx, dword [ebp - 8]
mov dword [esi], ecx
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 8]
mov dword [ecx], eax
jmp 0x418cde
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x418c74
mov eax, edi
shl eax, 2
push eax
push dword [0x420dbc]
call fcn.00411dfc
test eax, eax
mov esi, dword [ebp - 8]
pop ecx
pop ecx
je 0x418cde
jmp 0x418cd9
cmp dword [ebp - 4], 0
jne 0x418d45
test edi, edi
jge 0x418cad
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x420dbc]
call fcn.00411dfc
test eax, eax
pop ecx
pop ecx
je 0x418bf7
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov ecx, dword [ebp + 8]
and dword [ecx], 0
mov dword [0x420dbc], eax
cmp dword [ebp + 0xc], 0
je 0x418d30
push esi
call fcn.0040f9f0
inc eax
inc eax
push eax
call fcn.004101c7
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x418d30
push esi
push edi
call fcn.0040fec0
mov eax, edi
sub eax, esi
add eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov byte [eax], 0
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableA]
test eax, eax
jne 0x418d29
or dword [ebp - 0x10], 0xffffffff
push edi
call fcn.004101d9
pop ecx
cmp dword [ebp - 4], 0
je 0x418d3d
push esi
call fcn.004101d9
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x418bfa
push esi
call fcn.004101d9
mov eax, dword [ebp + 8]
and dword [eax], 0
pop ecx
jmp 0x418c04
Function at 0x401270
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x508
test eax, eax
push ebp
mov ebp, dword [esp + 0x510]
push esi
push edi
je 0x401336
mov eax, dword [0x40ef0c]
mov dword [esp + 0xc], 0
test eax, eax
jle 0x4012ec
mov edi, 0x40ef10
mov esi, ebp
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4012ca
test cl, cl
je 0x4012c6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4012ca
add eax, 2
add esi, 2
test cl, cl
jne 0x4012a6
xor eax, eax
jmp 0x4012cf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40132a
mov eax, dword [esp + 0xc]
mov ecx, dword [0x40ef0c]
inc eax
add edi, 0x104
cmp eax, ecx
mov dword [esp + 0xc], eax
jl 0x4012a2
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.Mir3.dat
push ebp
lea eax, [esp + 0x18]
push str._s_s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401336
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x508
ret
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x115]
mov byte [esp + 0x114], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.Mir3.dat
stosb byte es:[edi], al
call fcn.00402dd0
mov eax, dword [0x40ef0c]
mov edi, ebp
mov edx, eax
or ecx, 0xffffffff
shl edx, 6
add edx, eax
inc eax
mov dword [0x40ef0c], eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [edx*4 + 0x40ef10]
mov eax, ecx
mov esi, edi
mov edi, edx
push str.ksuser.dll
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
push str._s_s
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x124]
push ecx
call esi
lea edx, [esp + 0x128]
push edx
call fcn.00402d10
add esp, 0x18
lea eax, [esp + 0x114]
push 0
push eax
push 0x410f90
call dword [0x40e408]
push str.midimap.dll
push ebp
lea ecx, [esp + 0x11c]
push str._s_s
push ecx
call esi
lea edx, [esp + 0x124]
push edx
call fcn.00402d10
add esp, 0x14
lea eax, [esp + 0x114]
push 0
push eax
push 0x410f90
call dword [0x40e408]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x114]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x114]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.msimg32.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x114]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402d10
add esp, 4
lea ecx, [esp + 0x114]
push 0
push ecx
push 0x410f90
call dword [0x40e408]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x508
ret