joyce8/EMBER2024-capa huggingface dataset:
Function at 0x453597
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x4b2a58]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4535dd
cmp word [ebx], dx
jne 0x4535dd
or byte [eax + edi + 0x28], 4
jmp 0x4535e2
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x453745
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x453725
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x453623
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x453659
cmp eax, edx
jae 0x453667
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4535fe
jmp 0x453745
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x453720
cmp dword [ebp - 0x18], 0
je 0x453720
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4b2a58]
test byte [eax + edi + 0x28], 0x48
je 0x4536f6
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x4536ba
mov word [esi], cx
jmp 0x4536f1
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4b2a58]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4b2a58]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4b2a58]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x453745
pop eax
cmp word [ebp - 4], ax
jne 0x453706
cmp esi, ebx
jne 0x453706
mov word [esi], ax
jmp 0x453742
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00453fd0
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x453745
push 0xd
pop eax
jmp 0x453701
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4b2a58]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x45373f
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x453745
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x459480
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4594ad
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4594ad
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x404420
Capabilities:
Create service
Persist via windows service

Disassembly:
sub esp, 0x438
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x434], eax
push edi
call fcn.00404170
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x404565
push ebx
push esi
lea eax, [esp + 0xc]
push eax
call fcn.00523650
lea ecx, [esp + 0x11c]
push ecx
call fcn.00523650
lea edx, [esp + 0x22c]
push edx
call fcn.00523650
push 0
lea eax, [esp + 0x10]
push eax
call fcn.004ad650
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x120]
push str.__s___client_svc
push edx
call fcn.00524440
mov eax, dword [esp + 0x130]
add esp, 0xc
push eax
lea ecx, [esp + 0x230]
push ecx
call fcn.005277c0
mov edx, dword [esp + 0x234]
push 0
push 0
push 0
push 0
push 0
push edx
push 0
push 2
push 0x10
push 2
push str.Everything_Client
push str.Everything_Client
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x4044f2
call fcn.00404270
push esi
call ebx
jmp 0x404526
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x431
jne 0x404508
call fcn.00404270
jmp 0x404526
call esi
push eax
mov eax, dword [0x58eeec]
mov ecx, dword [eax + 0x1040]
mov edx, dword [eax]
push ecx
push edx
push 0x10
push 0
call fcn.004aa1b0
add esp, 0x14
push edi
call ebx
lea eax, [esp + 0x22c]
push eax
call fcn.00527550
lea ecx, [esp + 0x11c]
push ecx
call fcn.00527550
lea edx, [esp + 0xc]
push edx
call fcn.00527550
pop esi
pop ebx
pop edi
mov ecx, dword [esp + 0x434]
xor ecx, esp
call fcn.00549930
add esp, 0x438
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x58eeec]
mov ecx, dword [eax + 0x1044]
mov edx, dword [eax]
push ecx
push edx
push 0x10
push 0
call fcn.004aa1b0
mov ecx, dword [esp + 0x44c]
add esp, 0x14
pop edi
xor ecx, esp
call fcn.00549930
add esp, 0x438
ret

Function at 0x404930
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x230
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x22c], eax
push esi
mov esi, dword [esp + 0x238]
lea eax, [esp + 0x10]
push eax
call fcn.00523650
lea ecx, [esp + 0x120]
push ecx
call fcn.00523650
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea edx, [esp + 0x14]
push edx
call fcn.00523fd0
push esi
call fcn.005240c0
mov ecx, dword [esp + 0x18]
lea edx, [esp + 4]
lea eax, [esp + 0x120]
push edx
mov dword [esp + 0x10], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 0
call fcn.00404600
test eax, eax
je 0x4049b4
mov eax, dword [esp + 4]
push eax
call fcn.005220a0
push eax
push esi
call fcn.00523f80
lea ecx, [esp + 0x120]
push ecx
call fcn.00527550
lea edx, [esp + 0x10]
push edx
call fcn.00527550
mov ecx, dword [esp + 0x230]
pop esi
xor ecx, esp
call fcn.00549930
add esp, 0x230
ret 4
Function at 0x492430
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x4c8
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x4c4], eax
push ebx
push esi
mov esi, dword [esp + 0x4d4]
push edi
mov edi, dword [esp + 0x4e4]
lea eax, [esp + 0x120]
push eax
call fcn.00523650
lea ecx, [esp + 0x10]
push ecx
call fcn.00523650
lea edx, [esp + 0x230]
push edx
call fcn.00523650
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x14]
push ecx
push 0x15
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x130]
push eax
push edi
call fcn.00525640
push 0x190
call fcn.004a47b0
push 0x190
mov ebx, eax
push 0
push ebx
call fcn.0054a020
add esp, 0xc
lea ecx, [ebx + 0x15c]
push ecx
call fcn.00401330
lea edx, [ebx + 0x174]
push edx
call fcn.004a8b50
or edi, 0xffffffff
mov dword [ebx], edi
mov eax, dword [esp + 0x128]
push eax
call fcn.0051c5e0
mov dword [ebx + 0xe4], eax
mov ecx, dword [esp + 0xc]
mov dword [ebx + 0xf0], ecx
mov edx, dword [esp + 0x238]
push edx
call fcn.0051c5e0
mov dword [ebx + 0xec], eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0051c5e0
mov ecx, dword [esp + 0x4e8]
mov edx, dword [esp + 0x4dc]
mov dword [ebx + 0xe8], eax
mov eax, dword [esp + 0x4e0]
push 0x551656
mov dword [ebx + 0xf4], ecx
mov dword [ebx + 0xd8], 0
mov dword [ebx + 0xac], edx
mov dword [ebx + 0xb0], eax
mov dword [ebx], edi
mov dword [ebx + 0x40], edi
mov dword [ebx + 0x44], edi
mov dword [ebx + 0x48], edi
mov dword [ebx + 0x4c], edi
mov dword [ebx + 0x50], edi
mov dword [ebx + 0x54], edi
mov dword [ebx + 0x38], edi
mov dword [ebx + 0x3c], edi
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x1c], edi
call fcn.0051c5e0
push 0x551656
mov dword [ebx + 0x114], eax
call fcn.0051c5e0
mov dword [ebx + 0x118], eax
mov dword [ebx + 0x120], 0
mov dword [ebx + 0x128], edi
push 0
push 0
push 0
push 0x4921e0
push str.EVERYTHING_ETP_CLIENT
push 0
call fcn.004aa4a0
push 0
push 0
call dword [0x598d38]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push str.EVERYTHING_ETP_CLIENT
push str.EVERYTHING_ETP_CLIENT
push 0
call fcn.004aa5f0
push ebx
push eax
mov dword [ebx + 0xdc], eax
call fcn.004ac9b0
lea ecx, [esp + 0x340]
push ecx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x49266e
mov dword [ebx + 0xb4], 1
mov cx, word [esp + 0x340]
cmp cl, 1
je 0x49263f
mov ax, cx
shr ax, 8
cmp al, 1
je 0x49263f
movzx edx, al
movzx eax, cl
mov ecx, dword [0x58eeec]
push edx
mov edx, dword [ecx + 0x1184]
push eax
push edx
call fcn.00490760
add esp, 0xc
jmp 0x492684
mov dword [ebx + 0xd8], 3
mov eax, dword [0x58eeec]
mov edi, dword [eax + 0xf8]
mov esi, ebx
call fcn.004905b0
push ebx
push 0x4907e0
call fcn.004b21c0
mov dword [ebx + 0x14c], eax
jmp 0x49268c
mov ecx, dword [0x58eeec]
mov edx, dword [ecx + 0x1180]
push eax
push edx
call fcn.00490760
add esp, 8
push ebx
call fcn.00491250
xor ebx, ebx
lea eax, [esp + 0x230]
push eax
call fcn.00527550
lea ecx, [esp + 0x10]
push ecx
call fcn.00527550
lea edx, [esp + 0x120]
push edx
call fcn.00527550
mov ecx, dword [esp + 0x4d0]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00549930
add esp, 0x4c8
ret 0x14
Function at 0x495310
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x88
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x84], eax
push esi
push edi
push 0x248
call fcn.004a47b0
push 0x248
xor edi, edi
mov esi, eax
push edi
push esi
call fcn.0054a020
mov eax, dword [esp + 0xa0]
add esp, 0xc
push esi
push 0x493cd0
push edi
mov dword [esi + 8], eax
mov dword [esi + 0xa8], edi
call fcn.004c05b0
push eax
call fcn.00411950
push 0x551656
mov dword [esi + 0x8c], eax
call fcn.0051c5e0
push 0x551656
mov dword [esi + 0xb8], eax
mov dword [esi + 0x204], 0xffffffff
mov dword [esi + 0xb4], edi
mov dword [esi + 0x200], edi
call fcn.0051c5e0
push 0x551656
mov dword [esi + 0xdc], eax
call fcn.0051c5e0
push 0x551656
mov dword [esi + 0xe0], eax
mov dword [esi + 0xe8], edi
call fcn.0051c5e0
push 0x551656
mov dword [esi + 0x128], eax
call fcn.0051c5e0
lea ecx, [esp + 8]
push ecx
lea edx, [esi + 0xc]
mov dword [esi + 0x12c], eax
mov eax, dword [esi + 8]
push edx
push eax
mov dword [esi + 0x134], edi
mov dword [esi + 0xbc], 1
mov dword [esi + 0xf0], 0xffffffff
mov dword [esp + 0x14], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
mov eax, dword [esi + 8]
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x10]
push edx
push eax
mov dword [esp + 0x14], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
cmp word [esp + 0xc], 0x17
jne 0x49543a
mov dword [esi + 0xb4], 1
mov eax, dword [0x59912c]
cmp dword [eax + 8], edi
je 0x49545e
mov ecx, dword [eax + 0xc]
mov dword [ecx + 0xac], esi
mov edx, dword [0x59912c]
mov eax, dword [edx + 0xc]
mov dword [esi + 0xb0], eax
jmp 0x495467
mov dword [eax + 8], esi
mov dword [esi + 0xb0], edi
mov dword [esi + 0xac], edi
mov ecx, dword [0x59912c]
push str.Connected._r_n
push esi
mov dword [ecx + 0xc], esi
call fcn.00492b10
mov ecx, dword [esp + 0x94]
add esp, 8
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.00549930
add esp, 0x88
ret 4
Function at 0x496920
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x3b4
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x3b0], eax
cmp byte [0x58b758], 0
push edi
mov edi, dword [esp + 0x3bc]
je 0x496b81
lea eax, [esp + 4]
push eax
call fcn.00523650
lea ecx, [esp + 4]
push ecx
call fcn.005240c0
cmp dword [0x59912c], 0
jne 0x496b53
lea edx, [esp + 0x224]
push edx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x496b39
push 0x1c
call fcn.004a47b0
mov dword [0x59912c], eax
xor ecx, ecx
mov dword [eax], ecx
mov eax, dword [0x59912c]
mov dword [eax + 4], ecx
mov edx, dword [0x59912c]
mov dword [edx + 8], ecx
mov eax, dword [0x59912c]
mov dword [eax + 0xc], ecx
mov edx, dword [0x59912c]
mov dword [edx + 0x10], ecx
mov eax, dword [0x59912c]
mov dword [eax + 0x14], ecx
mov edx, dword [0x59912c]
mov dword [edx + 0x18], ecx
mov eax, dword [0x59902c]
push eax
call fcn.0051c5e0
mov ecx, dword [0x59912c]
push 0
push 0
push 0
push 0x496540
mov dword [ecx + 0x18], eax
mov edx, dword [0x59912c]
mov eax, dword [0x58b74c]
push str.EVERYTHING_ETP_SERVER
push 0
mov dword [edx + 0x14], eax
call fcn.004aa4a0
push 0
push 0
call dword [0x598d38]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push str.EVERYTHING_ETP_SERVER
push str.EVERYTHING_ETP_SERVER
push 0
call fcn.004aa5f0
mov ecx, dword [0x59912c]
mov dword [ecx + 0x10], eax
mov cx, word [esp + 0x224]
cmp cl, 1
je 0x496a73
mov ax, cx
shr ax, 8
cmp al, 1
je 0x496a73
movzx edx, al
movzx eax, cl
mov ecx, dword [0x58eeec]
push edx
mov edx, dword [ecx + 0x1184]
push eax
push edx
lea eax, [esp + 0x10]
push eax
call fcn.00524440
add esp, 0x10
jmp 0x496afa
mov ecx, dword [0x59902c]
cmp byte [ecx], 0
je 0x496aee
push esi
lea edx, [esp + 0x118]
push edx
call fcn.00523650
mov eax, dword [0x59902c]
push eax
lea eax, [esp + 0x11c]
push eax
call fcn.005251d0
mov esi, eax
test esi, esi
je 0x496ade
jmp 0x496ab0
mov eax, dword [esp + 0x120]
cmp byte [eax], 0
je 0x496aca
lea ecx, [esp + 8]
push ecx
call fcn.00492960
test eax, eax
je 0x496ade
push esi
lea edx, [esp + 0x11c]
push edx
call fcn.005251d0
mov esi, eax
test esi, esi
jne 0x496ab0
lea eax, [esp + 0x118]
push eax
call fcn.00527550
pop esi
jmp 0x496afa
lea ecx, [esp + 4]
push ecx
xor eax, eax
call fcn.00492960
mov edx, dword [0x59912c]
cmp dword [edx], 0
je 0x496b32
mov eax, dword [esp + 0xc]
cmp byte [eax], 0
je 0x496b21
push eax
push str.ETP_server_started__but_with_errors:__s_n
push 0xffff0000
call fcn.0048f0a0
add esp, 0xc
push str.ETP_server_online._r_n
push 0
call fcn.00492b10
add esp, 8
jmp 0x496b77
call fcn.00495270
jmp 0x496b53
push eax
mov eax, dword [0x58eeec]
mov ecx, dword [eax + 0x1180]
push ecx
lea edx, [esp + 0xc]
push edx
call fcn.00524440
add esp, 0xc
mov eax, dword [esp + 0xc]
cmp byte [eax], 0
je 0x496b77
push eax
mov eax, dword [0x58eeec]
mov ecx, dword [eax + 0x1130]
mov edx, dword [eax]
push ecx
push edx
push 0x10
push edi
call fcn.004aa1b0
add esp, 0x14
lea eax, [esp + 4]
push eax
call fcn.00527550
mov ecx, dword [esp + 0x3b4]
pop edi
xor ecx, esp
call fcn.00549930
add esp, 0x3b4
ret 4
Function at 0x4973b0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push ebx
push ebp
push 1
push eax
xor ebp, ebp
call fcn.004a9cd0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x497454
push esi
lea ecx, [esp + 0xc]
push ecx
push ebx
call fcn.004aba70
test eax, eax
je 0x49744c
push edi
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x497437
push edi
call fcn.004a47f0
mov esi, eax
test esi, esi
je 0x49744b
push ebp
lea edx, [esp + 0x20]
push edx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49741e
cmp dword [esp + 0x1c], edi
jne 0x49741e
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
push ecx
push edi
push esi
call dword [esp + 0x30]
mov ebp, eax
push esi
call fcn.004a4810
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 8
ret 0x10
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push edx
push eax
push 0
push 0
call dword [esp + 0x30]
mov ebp, eax
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 8
ret 0x10

Function at 0x497460
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x24
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
push ebx
push esi
mov esi, dword [esp + 0x34]
push edi
push 1
push eax
xor edi, edi
call fcn.004a9cd0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x49751c
push edi
lea eax, [esp + 0x10]
push eax
push 0x1a
lea ecx, [esp + 0x1c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x497515
cmp dword [esp + 0xc], 0x1a
jne 0x497515
mov edx, dword [esp + 0x10]
and edx, 0xffffff00
cmp edx, 0x474e5000
jne 0x497515
cmp dword [esp + 0x1c], 0x52444849
jne 0x497515
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
bswap eax
bswap ecx
mov dword [esi], eax
movzx eax, byte [esp + 0x29]
sub eax, 2
mov dword [esi + 4], ecx
movzx ecx, byte [esp + 0x28]
mov dword [esi + 8], ecx
je 0x49750a
sub eax, 2
je 0x497502
sub eax, 2
jne 0x497510
lea edx, [ecx*4]
mov dword [esi + 8], edx
jmp 0x497510
lea eax, [ecx + ecx]
mov dword [esi + 8], eax
jmp 0x497510
lea ecx, [ecx + ecx*2]
mov dword [esi + 8], ecx
mov edi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x2c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00549930
add esp, 0x24
ret 8

Function at 0x497540
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x20
push esi
push edi
push 1
push eax
xor edi, edi
call fcn.004a9cd0
mov esi, eax
cmp esi, 0xffffffff
je 0x4975a7
push edi
lea ecx, [esp + 0x30]
push ecx
push 0x1e
lea edx, [esp + 0x14]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4975a0
cmp dword [esp + 0x2c], 0x1e
jne 0x4975a0
cmp word [esp + 8], 0x4d42
jne 0x4975a0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1a]
mov edx, dword [esp + 0x1e]
mov dword [eax], ecx
movzx ecx, word [esp + 0x24]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
add esp, 0x20
ret 8
Function at 0x4977e0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0xc
push esi
push edi
push 1
push eax
xor edi, edi
call fcn.004a9cd0
mov esi, eax
cmp esi, 0xffffffff
je 0x49785a
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0xa
lea edx, [esp + 0x14]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x497853
cmp dword [esp + 0x18], 0xa
jne 0x497853
cmp dword [esp + 8], 0x38464947
jne 0x497853
mov ax, word [esp + 0xc]
cmp ax, 0x6139
je 0x497834
cmp ax, 0x6137
jne 0x497853
movzx ecx, word [esp + 0xe]
mov eax, dword [esp + 0x1c]
movzx edx, word [esp + 0x10]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [eax + 8], 8
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
add esp, 0xc
ret 8

Function at 0x497870
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xbc
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xc0]
push ebx
push ebp
mov ebp, dword [esp + 0xcc]
push esi
push 1
push eax
xor esi, esi
call fcn.004a9cd0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4979dc
lea eax, [esp + 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je case.default.0x49792d
mov ecx, dword [esp + 0x34]
push esi
push esi
add ecx, 0xffffff80
push ecx
push ebx
call fcn.004af360
test eax, eax
je case.default.0x49792d
push esi
lea edx, [esp + 0x10]
push edx
push 0x80
lea eax, [esp + 0x50]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je case.default.0x49792d
cmp dword [esp + 0xc], 0x80
jne case.default.0x49792d
cmp byte [esp + 0x44], 0x54
jne case.default.0x49792d
cmp byte [esp + 0x45], 0x41
jne case.default.0x49792d
cmp byte [esp + 0x46], 0x47
jne case.default.0x49792d
cmp ebp, 6
ja case.default.0x49792d
jmp dword [ebp*4 + 0x4979f8]
push 0x1e
lea ecx, [esp + 0x4b]
push ecx
push edi
call fcn.00525c90
jmp 0x4979d0
push 0x1e
lea edx, [esp + 0x69]
push edx
push edi
call fcn.00525c90
jmp 0x4979d0
push 0x1e
lea eax, [esp + 0x87]
push eax
push edi
call fcn.00525c90
jmp 0x4979d0
push 4
lea ecx, [esp + 0xa5]
push ecx
push edi
call fcn.00525c90
jmp 0x4979d0
push 0x1e
lea edx, [esp + 0xa9]
push edx
push edi
call fcn.00525c90
jmp 0x4979d0
cmp byte [esp + 0xc1], 0
jne case.default.0x49792d
mov al, byte [esp + 0xc2]
test al, al
je case.default.0x49792d
movzx eax, al
push eax
push 0x551658
push edi
call fcn.00524440
add esp, 0xc
jmp 0x4979d0
mov al, byte [esp + 0xc3]
cmp al, 0x7e
jae case.default.0x49792d
movzx ecx, al
mov edx, dword [ecx*4 + 0x58d068]
push edx
push edi
call fcn.00523f80
mov esi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xc4]
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00549930
add esp, 0xbc
ret 8
Function at 0x49e2e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x144
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push ebp
mov ebp, dword [esp + 0x150]
push esi
xor ebx, ebx
push edi
mov esi, ecx
mov dword [esp + 0x10], ebx
xor edi, edi
lea esp, [esp]
mov eax, dword [ebx + 0x58d4e8]
push eax
push ebp
call fcn.0051d6f0
test eax, eax
je 0x49e34b
add ebx, 0xc
add edi, 1
cmp ebx, 0x60
jb 0x49e310
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x150]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00549930
add esp, 0x144
ret 4
mov edx, dword [0x5991b0]
lea edi, [edi + edi*2]
add edi, edi
movzx ecx, word [edi + edi + 0x58d4f0]
add edi, edi
push 0xa
push ecx
push edx
call dword [0x598cfc]
mov ebp, eax
test ebp, ebp
je 0x49e32c
mov eax, dword [0x5991b0]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
jle 0x49e32c
mov ecx, dword [0x5991b0]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esp + 0x14], eax
je 0x49e32c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
je 0x49e44c
lea edx, [esp + 0x40]
push edx
call fcn.00523650
mov eax, dword [0x5991b0]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.004ad650
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.004ade20
lea ecx, [esp + 0x40]
push ecx
call fcn.00527550
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x58d4ec]
push 0
push 0
push 0
push 0
push 0
push 1
push edx
push eax
mov eax, ebx
cdq
push edx
push eax
push ecx
mov edi, esi
call fcn.0049c950
push ebp
mov eax, ebx
mov ecx, esi
call fcn.0049b260
call fcn.0049abc0
mov edx, dword [esi]
mov eax, dword [0x599158]
push 0
push edx
mov dword [esi + 0x54], 1
mov ecx, dword [eax + 8]
push 0x401
push ecx
call dword [0x598e1c]
mov edx, dword [esp + 0x14]
push edx
mov esi, 1
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
jmp 0x49e330
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
jmp 0x49e330