joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10018587
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x1c
mov eax, 0x100360c9
call fcn.10034950
xor ebx, ebx
mov esi, ebx
mov dword [ebp - 0x18], esi
push 2
push ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadLibraryExW]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x100185d6
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x10018719
movzx ebx, bx
or ebx, 0x80070000
jmp 0x10018719
push ebx
push 0x3ec
push dword [ebp + 0x10]
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FindResourceExW]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x1001860b
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x100186fe
movzx ebx, bx
or ebx, 0x80070000
jmp 0x100186fe
push eax
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadResource]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x100185ed
push dword [ebp - 0x14]
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_SizeofResource]
mov ecx, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], ecx
mov edi, eax
cmp byte [ecx + eax], 0
je 0x10018688
lea edi, [ecx + 1]
cmp edi, 0x400
ja 0x10018655
mov ecx, edi
call fcn.10017857
test al, al
je 0x10018655
mov eax, edi
call fcn.100350a0
mov edi, esp
jmp 0x10018663
push edi
lea ecx, [ebp - 0x18]
call fcn.100178c0
mov esi, dword [ebp - 0x18]
mov edi, eax
test edi, edi
jne 0x10018671
mov ebx, 0x8007000e
jmp 0x100186fb
mov eax, dword [ebp - 0x14]
inc eax
push eax
push dword [ebp - 0x1c]
push edi
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x14]
add esp, 0xc
mov byte [edi + eax], bl
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001868d
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x1c], eax
add eax, eax
mov dword [ebp - 0x14], eax
cmp eax, 0x400
ja 0x100186bf
mov ecx, eax
call fcn.10017857
test al, al
mov eax, dword [ebp - 0x14]
je 0x100186bf
call fcn.100350a0
mov eax, esp
jmp 0x100186cb
push eax
lea ecx, [ebp - 0x18]
call fcn.100178c0
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x100186ed
push dword [ebp - 0x1c]
xor ecx, ecx
push eax
push 0xffffffffffffffff
push edi
push ebx
push ebx
mov word [eax], cx
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
neg eax
sbb ebx, ebx
and ebx, dword [ebp - 0x14]
push dword [ebp + 0x14]
lea ecx, [ebp - 0x28]
push ebx
call fcn.10018469
mov ebx, eax
mov edi, dword [ebp - 0x20]
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
test esi, esi
je 0x10018719
mov edi, dword [esi]
push esi
mov esi, edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test edi, edi
jne 0x10018709
mov eax, ebx
lea esp, [ebp - 0x38]
call fcn.10034902
ret 0x10
Function at 0x10024279
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x1003b2b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x414], ebx
mov byte [ebp - 8], bl
or dword [esi], 0xffffffff
lea eax, [esi + 4]
push eax
push 0x10005edc
push 0x10005e54
lea eax, [ebp - 0x408]
mov dword [esi + 0x38], ebx
push 0x400
push eax
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
call fcn.1002418b
add esp, 0x14
lea eax, [ebp - 0x414]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x408]
push eax
push 0x80000002
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExA]
test eax, eax
jne 0x100243e8
push edi
push 4
pop edi
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], edi
push eax
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x40c], ebx
push eax
push ebx
push ebx
push 0x10005ef8
push dword [ebp - 0x414]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExA]
test eax, eax
jne 0x10024339
cmp dword [ebp - 0x40c], eax
setne al
mov dword [esi + 0x38], eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], edi
push eax
lea eax, [ebp - 0x40c]
push eax
push ebx
push ebx
push 0x10005eb0
push dword [ebp - 0x414]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExA]
test eax, eax
jne 0x10024370
cmp dword [ebp - 0x40c], eax
setne al
mov dword [esi + 0x3c], eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], edi
push eax
lea eax, [ebp - 0x40c]
push eax
push ebx
push ebx
push 0x10005f10
push dword [ebp - 0x414]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExA]
test eax, eax
jne 0x100243a7
cmp dword [ebp - 0x40c], eax
setne al
mov dword [esi + 0x40], eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], edi
push eax
lea eax, [ebp - 0x40c]
push eax
push ebx
push ebx
push 0x10005ec8
push dword [ebp - 0x414]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExA]
pop edi
test eax, eax
jne 0x100243dc
mov eax, dword [ebp - 0x40c]
mov dword [esi + 0x48], eax
push dword [ebp - 0x414]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
cmp dword [esi + 0x38], ebx
jne 0x100243f7
cmp dword [esi + 0x3c], ebx
jne 0x100243f7
cmp dword [esi + 0x40], ebx
je 0x100243fa
xor ebx, ebx
inc ebx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x44], ebx
xor ecx, ebp
pop esi
pop ebx
call fcn.100342a0
leave
ret
Function at 0x1002443e
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x1003b2b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov dword [ebp - 0x28c], eax
mov ebx, ecx
mov eax, dword [ebp + 0x18]
push 0x201
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x274]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x51
lea eax, [ebp - 0x70]
push 0
push eax
call sub.msvcrt.dll_memset
mov esi, dword [ebp + 8]
lea edi, [ebp - 0x1c]
xor eax, eax
add esp, 0x18
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
cmp esi, 0x10000
je 0x100244d7
cmp esi, 0x100000
je 0x100244d0
cmp esi, 0x1000000
je 0x100244c9
cmp esi, 0x10000000
je 0x100244c2
mov edi, 0x10005e7c
jmp 0x100244dc
mov edi, 0x10005e5c
jmp 0x100244dc
mov edi, 0x10005e64
jmp 0x100244dc
mov edi, 0x10005e6c
jmp 0x100244dc
mov edi, 0x10005e74
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetLocalTime]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
push eax
movzx eax, word [ebp - 0x276]
push eax
movzx eax, word [ebp - 0x278]
push eax
movzx eax, word [ebp - 0x27a]
push eax
movzx eax, word [ebp - 0x27c]
push eax
push edi
lea eax, [ebp - 0x70]
mov edi, 0x200
push eax
lea eax, [ebx + 4]
push eax
push 0x10005e84
lea eax, [ebp - 0x274]
push edi
push eax
call fcn.1002418b
lea ecx, [ebp - 0x274]
add esp, 0x30
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10024540
push dword [ebp - 0x288]
sub ecx, edx
lea eax, [ebp - 0x274]
push dword [ebp - 0x28c]
sub edi, ecx
add eax, ecx
push edi
push eax
call dword [sym.imp.msvcrt.dll_sprintf_s]
add esp, 0xc
lea ecx, [ebp - 0x274]
call fcn.10024105
xor edi, edi
cmp dword [ebx + 0x38], edi
je 0x10024589
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringA]
cmp dword [ebx + 0x3c], edi
jne 0x10024593
cmp dword [ebx + 0x40], edi
je 0x100245ab
cmp dword [ebx], 0xffffffff
je 0x100245ab
lea eax, [ebp - 0x274]
or esi, 1
push eax
push esi
push dword [ebx]
call dword [sym.imp.rtutils.dll_TracePutsExA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100342a0
leave
ret 0x14
Function at 0x10034a00
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x10034a3e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x10034a36
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x10034a40
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x10034a26
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x10034b20
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10034b4f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10034b4f
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x402a7e
Capabilities:
Encode data using xor

Disassembly:
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0xc]
cmp dword [esp + 0x10], esi
jbe 0x402acb
mov al, byte [edi + esi]
xor al, 0x73
sub al, 0x58
push 0x41f390
push 0x45e6b0
mov byte [edi + esi], al
call fcn.00401374
push eax
call fcn.004019f8
mov al, byte [edi + esi]
add esp, 0xc
sub al, 0x14
xor al, 0x74
add al, 0x4e
xor al, 0x70
sub al, 0x65
xor al, 0x22
sub al, 0x73
xor al, 0x2a
mov byte [edi + esi], al
inc esi
cmp esi, dword [esp + 0x10]
jb 0x402a8c
pop edi
pop esi
ret

Function at 0x402f68
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x45d500]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x41f3b0
lea ecx, [ebp - 0x1c]
call fcn.00401af2
push 0xc
call fcn.004065e4
xor esi, esi
pop ecx
test eax, eax
je 0x402fa1
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
call fcn.00401b4b
jmp 0x402fa3
mov eax, esi
mov eax, dword [eax + 4]
shl eax, 2
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0x40
push 0x4ac
push 0x45d018
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
call dword [sym.imp.KERNEL32.DLL_FreeConsole]
push esi
push esi
push esi
push 0x402a6c
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
call fcn.00402a52
mov edx, 0x45d018
add edx, 0x188
mov esi, 0x429018
push esi
call edx
lea ecx, [ebp - 0x1c]
call fcn.00402918
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.00406622
leave
ret

Function at 0x4071ff
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
je 0x40723e
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40723e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40723e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40723e
cmp dword [ecx + 0x74], 0xe
jbe 0x40723e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x411ef9
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x422500
push 0x4224f8
push 0x420d94
push 0x1e
call fcn.00411d66
mov esi, eax
add esp, 0x10
test esi, esi
je 0x411f2d
push dword [ebp + 8]
mov ecx, esi
call dword [0x41f140]
call esi
jmp 0x411f33
call dword [sym.imp.KERNEL32.DLL_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x412210
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41223d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41223d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x7d8058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.007d81a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x7d807e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d806a
add dl, dl
jne 0x7d8089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d80dc
xor eax, eax
add dl, dl
jne 0x7d8096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d817d
add dl, dl
jne 0x7d80a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x7d80d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x7d8075
mov eax, 1
add dl, dl
jne 0x7d80ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d80e1
sub eax, ebx
mov ebx, 1
jne 0x7d8128
mov ecx, 1
add dl, dl
jne 0x7d810e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x7d8119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d8105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x7d813f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x7d814a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d8136
cmp eax, 0x7d00
jae 0x7d816d
cmp eax, 0x500
jb 0x7d8168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
cmp eax, 0x7f
ja 0x7d8170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x7d819e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x7d8075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x404230
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40f018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
mov edi, dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, ecx
push esi
push 0
push 0
push 0x258
push 0x258
push 0
push closesocket
push 0xa0000
push 0x412bf0
push 0x412b88
push 0
mov dword [0x412b84], esi
call edi
mov dword [0x412b80], eax
test eax, eax
jne 0x404294
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004091cb
mov esp, ebp
pop ebp
ret
push 0
push esi
push 0x6a
push eax
push 0
push 0
push 0
push 0
push 0x50000000
push 0
push str.msctls_statusbar32
push 0
call edi
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
mov esi, eax
push 0
push esi
call edi
lea eax, [ebp - 0x10]
push eax
push 3
push 0x404
push esi
mov dword [ebp - 0x10], 0x87
mov dword [ebp - 0xc], 0x101
mov dword [ebp - 8], 0xffffffff
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 8]
mov edx, dword [0x412b80]
push ecx
push edx
call edi
mov eax, dword [0x412b80]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 1
pop esi
call fcn.004091cb
mov esp, ebp
pop ebp
ret
Function at 0x4055d0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x40f018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40f62c]
push ebx
push esi
push edi
test eax, eax
js 0x4056d9
cmp eax, 2
jge 0x4056d9
mov esi, eax
imul esi, esi, 0x214
push ecx
add esi, 0x40f204
inc eax
lea edi, [esi + 4]
push 0x100
mov dword [0x40f62c], eax
push edi
mov dword [esi], 1
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
cmp dword [esi], 0
je 0x4056d9
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0xe]
movzx ecx, word [ebp - 0x12]
movzx edx, word [ebp - 0x14]
push eax
push ecx
push edx
push edi
lea ebx, [esi + 0x110]
push str.._s_04d__02d__02d.txt
push ebx
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
mov dword [esi + 0x10c], edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x4056b4
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004091cb
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4056d9
mov ecx, dword [esi + 0x210]
push ecx
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004091cb
mov esp, ebp
pop ebp
ret
Function at 0x4056f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x40f018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
test eax, eax
js 0x4058e7
cmp eax, dword [ecx + 0x42c]
jge 0x4058e7
imul eax, eax, 0x214
cmp dword [eax + ecx + 4], 0
lea esi, [eax + ecx + 4]
je 0x4058e7
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x812]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
cmp ecx, dword [esi + 0x104]
jne 0x405776
movzx edx, word [ebp - 0x816]
cmp edx, dword [esi + 0x108]
jne 0x405776
movzx eax, word [ebp - 0x818]
cmp eax, dword [esi + 0x10c]
je 0x405833
mov ecx, dword [esi + 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0x812]
movzx ecx, word [ebp - 0x816]
movzx edx, word [ebp - 0x818]
push eax
push ecx
push edx
mov dword [esi + 0x10c], edx
lea edx, [esi + 4]
push edx
lea edi, [esi + 0x110]
push str.._s_04d__02d__02d.txt
push edi
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
call ebx
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x4057fd
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004091cb
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405833
mov eax, dword [esi + 0x210]
push eax
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004091cb
mov esp, ebp
pop ebp
ret
push 0x3ff
lea ecx, [ebp - 0x807]
push 0
push ecx
mov byte [ebp - 0x808], 0
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
push edx
push eax
lea ecx, [ebp - 0x808]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll_vsprintf_s]
push 0x3ff
lea edx, [ebp - 0x407]
push 0
push edx
mov byte [ebp - 0x408], 0
call sub.MSVCR100.dll_memset
movzx ecx, word [ebp - 0x80c]
movzx edx, word [ebp - 0x80e]
lea eax, [ebp - 0x808]
push eax
movzx eax, word [ebp - 0x810]
push ecx
push edx
push eax
lea ecx, [ebp - 0x408]
push str._02d:_02d:_02d__s_r_n
push ecx
call ebx
lea eax, [ebp - 0x408]
add esp, 0x40
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4058c0
mov ecx, dword [esi + 0x210]
sub eax, edx
push 0
lea edx, [ebp - 0x81c]
push edx
push eax
lea eax, [ebp - 0x408]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004091cb
mov esp, ebp
pop ebp
ret
Function at 0x405900
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, eax
cmp ecx, 0xff
ja 0x4059be
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
mov dword [ebp - 4], edx
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405920
sub eax, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ecx + 0x40b358]
mov dword [esi + 0x34], edx
mov edx, dword [ecx + 0x40b35c]
mov dword [esi + 0x38], edx
mov edx, dword [ecx + 0x40b360]
mov dword [esi + 0x3c], edx
mov ecx, dword [ecx + 0x40b364]
mov edx, dword [ebp + 8]
mov dword [esi + 0x40], ecx
push edx
mov ecx, esi
call fcn.00405a50
call fcn.00405b40
mov eax, dword [esi + 0x8c]
mov ecx, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
mov dword [edi], eax
mov eax, dword [esi + 0x98]
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
mov dword [edi + 0xc], eax
mov byte [esi + 0x9c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x34], 0x67452301
mov dword [esi + 0x38], 0xefcdab89
mov dword [esi + 0x3c], 0x98badcfe
mov dword [esi + 0x40], 0x10325476
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x406390
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, eax
push str.AllowableIpList.txt
lea ebx, [esi + 0xc]
push 0x100
push ebx
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
push 0
push 0x20
push 3
push 0
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4063ec
push ebx
push str.__s__Could_not_open_file
add esi, 0x218
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x406410
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [esi + 4], 0
mov eax, dword [esi + 8]
push eax
call fcn.004091c0
add esp, 4
mov dword [esi + 4], eax
test eax, eax
jne 0x406449
push ebx
push str.__s__Could_not_alloc_file_buffer
add esi, 0x218
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 8]
push 0
lea ecx, [ebp - 4]
push ecx
push edx
push eax
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40646e
push ebx
push str.__s__Could_not_read_file
jmp 0x406429
mov eax, dword [esi + 4]
cmp byte [eax], 0xef
jne 0x40648a
cmp byte [eax + 1], 0xbb
jne 0x40648a
cmp byte [eax + 2], 0xbf
jne 0x40648a
push ebx
push str.__s__The_file_is_codified_in_UTF_8_BOM_and_cannot_be_read._Change_it_to_UTF_8_and_try_again
jmp 0x406429
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
pop edi
mov dword [esi + 0x214], eax
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret