joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406b80
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [0x4360e4]
xor eax, esp
mov dword [esp + 8], eax
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov eax, dword [ebx + 4]
add eax, 0x18
lock inc dword [eax]
cmp byte [ebp + 0x18], 0
push 0
je 0x406bd2
mov ecx, dword [ebx + 4]
push 0
push edi
call fcn.00403940
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ecx]
cmp eax, 0xffffffff
jne 0x406bfb
mov ecx, dword [ebx + 4]
push 0x2719
push edi
call fcn.00403940
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
push edi
push dword [ebp + 0x14]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push ecx
push dword [ebp + 0x10]
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test esi, esi
je 0x406c59
cmp eax, 0x3e5
je 0x406c59
push dword [esp + 0x10]
mov ecx, dword [ebx + 4]
push eax
push edi
call fcn.00403940
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
mov esi, dword [ebx + 4]
lea ecx, [edi + 0x1c]
mov ebx, 1
xor eax, eax
mov edx, ebx
lock cmpxchg dword [ecx], edx
cmp eax, ebx
jne 0x406cb4
push edi
push 2
push 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x406cb4
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x406c9f
mov dword [eax + 0x14], edi
jmp 0x406ca2
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
xchg dword [eax], ebx
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
Function at 0x406cd0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [0x4360e4]
xor eax, esp
mov dword [esp + 8], eax
mov edx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x1c]
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [edi + 4]
add eax, 0x18
lock inc dword [eax]
cmp byte [ebp + 0x18], 0
push 0
je 0x406d22
mov ecx, dword [edi + 4]
push 0
push esi
call fcn.00403940
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ecx]
cmp ecx, 0xffffffff
jne 0x406d4b
mov ecx, dword [edi + 4]
push 0x2719
push esi
call fcn.00403940
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp + 0x14]
push esi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push dword [ebp + 0x10]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
jne 0x406d84
mov eax, 0x2746
jmp 0x406d91
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test ebx, ebx
je 0x406dbe
cmp eax, 0x3e5
je 0x406dbe
push dword [esp + 0xc]
mov ecx, dword [edi + 4]
push eax
push esi
call fcn.00403940
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
mov edi, dword [edi + 4]
lea ecx, [esi + 0x1c]
mov ebx, 1
xor eax, eax
mov edx, ebx
lock cmpxchg dword [ecx], edx
cmp eax, ebx
jne 0x406e19
push esi
push 2
push 0
push dword [edi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x406e19
lea eax, [edi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esi + 0x14], 0
mov eax, dword [edi + 0x58]
test eax, eax
je 0x406e04
mov dword [eax + 0x14], esi
jmp 0x406e07
mov dword [edi + 0x54], esi
mov dword [edi + 0x58], esi
lea eax, [edi + 0x34]
xchg dword [eax], ebx
lea eax, [edi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 0x18
Function at 0x407790
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428c3b
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x4360e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x438724]
cmp eax, dword [ecx + 4]
jle 0x4077fd
push 0x438724
call fcn.0040f975
add esp, 4
cmp dword [0x438724], 0xffffffff
jne 0x4077fd
push 0x429990
call fcn.0040fdcc
push 0x438724
call fcn.0040f92b
add esp, 8
mov esi, dword [0x4384cc]
test esi, esi
jne 0x40791b
push 0x60
call fcn.0040fa4b
mov esi, eax
mov dword [ebp - 0x1c], esi
push 0x60
push 0
push esi
mov dword [ebp - 4], 0
call fcn.004119f0
add esp, 0x10
mov byte [esi], 1
lea ecx, [esi + 0xc]
mov dword [esi + 4], 0xf000
mov dword [esi + 8], 0x5c0
call fcn.00403f70
mov eax, dword [esi + 0x14]
mov dword [esi + 0x18], eax
lock inc dword [eax + 0x18]
push 4
mov byte [ebp - 4], 2
call fcn.0040fa4b
mov dword [ebp - 0x14], eax
mov dword [eax], esi
lea edi, [esi + 0x20]
mov byte [ebp - 4], 3
push edi
push 0
push eax
push 0x40ad00
push 0
push 0
call fcn.004130df
add esp, 0x1c
mov dword [esi + 0x1c], eax
test eax, eax
je 0x407939
lea eax, [esi + 0x24]
push 0x102
push eax
call fcn.0040f576
add esp, 8
lea ecx, [esi + 0x54]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 7
push eax
push dword [ecx + 4]
call fcn.0040a540
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4078f3
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edi + 4], eax
jne 0x4078f3
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], ebx
dec ebx
jne 0x4078f3
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edi, dword [0x4384cc]
mov dword [0x4384cc], esi
test edi, edi
je 0x40791b
mov ecx, edi
call fcn.004079d0
push 0x60
push edi
call fcn.0040fde6
mov esi, dword [0x4384cc]
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f853
mov esp, ebp
pop ebp
ret
push 6
mov dword [edi], 0
call fcn.0040f24a
int3
Function at 0x409320
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
mov eax, dword [0x4360e4]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, 1
lock xadd dword [0x4384d8], eax
inc eax
mov ebx, 0x4384dc
cmp eax, 1
jne 0x409366
lea eax, [esp + 0x18]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [ebx], eax
cmp byte [ebp + 8], 0
je 0x409376
xor esi, esi
lock xadd dword [ebx], esi
test esi, esi
jne 0x40938f
mov ecx, dword [esp + 0x1ac]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 4
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4384c8]
cmp eax, dword [ecx + 4]
jle 0x4093d4
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], 0xffffffff
jne 0x4093d4
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov edx, str.winsock
mov dword [esp + 0x10], esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], 0x4369a8
call fcn.00402270
int3
Function at 0x40bfe0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429315
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x4360e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x10], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
jne 0x40c022
push eax
push edx
call fcn.0040c410
jmp 0x40c163
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x40c04c
push edx
push fcn.0040c410
push esi
call eax
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edx + 8]
mov edi, dword [edx]
mov ebx, dword [edx + 4]
mov dword [edx + 4], 0
mov dword [edx + 8], 0
mov ecx, dword [edx + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x58], eax
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x54], eax
mov al, byte [edx + 0x10]
mov byte [ebp - 0xd], al
mov byte [ebp - 0x50], al
mov al, byte [edx + 0x14]
mov byte [ebp - 0xe], al
mov byte [ebp - 0x4c], al
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x48], eax
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x44], eax
mov eax, dword [edx + 0x24]
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], 0
lea eax, [ebp - 0xf]
push dword [0x43872c]
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40c0cf
mov ecx, dword [eax + 4]
jmp 0x40c0d1
xor ecx, ecx
push ecx
push dword [ebp - 0x18]
mov edx, 0x30
call fcn.0040ca00
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 4], edi
mov dword [eax + 8], ebx
mov dword [eax + 0x10], ecx
mov cl, byte [ebp - 0xd]
mov byte [eax + 0x14], cl
mov cl, byte [ebp - 0xe]
mov byte [eax + 0x18], cl
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp - 0x28]
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x24], ecx
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x28], ecx
lea ecx, [ebp - 0x38]
mov dword [eax], 0x40cbf0
mov dword [ebp - 0x14], eax
call fcn.0040c850
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x14]
mov eax, dword [esi + 0x14]
push ecx
push esi
mov eax, dword [eax + 8]
call eax
add esp, 8
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40c166
push 0
push eax
mov eax, dword [eax]
call eax
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40c7e0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
mov edi, ecx
cmp dword [edi + 8], 0
je 0x40c7f1
mov dword [edi + 8], 0
mov esi, dword [edi + 4]
test esi, esi
je 0x40c833
push dword [0x43872c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40c823
mov edx, dword [eax + 4]
test edx, edx
je 0x40c823
mov eax, 4
cmp dword [edx + eax*4], 0
lea ecx, [edx + eax*4]
je 0x40c836
inc eax
cmp eax, 6
jl 0x40c814
push esi
call fcn.0040fde1
add esp, 4
mov dword [edi + 4], 0
pop edi
pop esi
ret
mov al, byte [esi + 0x20]
mov byte [esi], al
mov dword [ecx], esi
mov dword [edi + 4], 0
pop edi
pop esi
ret

Function at 0x40c850
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 8]
test esi, esi
je 0x40c88c
mov esi, dword [esi + 0xc]
test esi, esi
je 0x40c885
push ebx
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x40c884
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x40c884
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
pop ebx
mov dword [edi + 8], 0
mov esi, dword [edi + 4]
test esi, esi
je 0x40c8cf
push dword [0x43872c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40c8bf
mov edx, dword [eax + 4]
test edx, edx
je 0x40c8bf
mov eax, 4
nop
cmp dword [edx + eax*4], 0
lea ecx, [edx + eax*4]
je 0x40c8d2
inc eax
cmp eax, 6
jl 0x40c8b0
push esi
call fcn.0040fde1
add esp, 4
mov dword [edi + 4], 0
pop edi
pop esi
ret
mov al, byte [esi + 0x30]
mov byte [esi], al
mov dword [ecx], esi
mov dword [edi + 4], 0
pop edi
pop esi
ret
Function at 0x40cd00
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4294a5
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4360e4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, dword [edi + 4]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], edi
test al, 1
jne 0x40cd6b
push dword [0x43872c]
and eax, 0xfffffffc
mov esi, dword [eax + 8]
lea eax, [esi + 0x14]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40cd6b
nop dword [eax]
cmp dword [eax], esi
je 0x40cd8d
mov eax, dword [eax + 8]
test eax, eax
jne 0x40cd60
push dword [0x43872c]
lea eax, [edi + 1]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40ce0d
mov ecx, dword [eax + 4]
jmp 0x40ce0f
cmp dword [eax + 4], 0
je 0x40cd6b
mov eax, dword [ebx]
mov dword [ebp - 0x18], eax
mov dword [ebx], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 2
push eax
push eax
call fcn.0040add0
add esp, 8
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40ced4
push 0
push eax
mov eax, dword [eax]
call eax
add esp, 8
jmp 0x40ced4
xor ecx, ecx
push ecx
push dword [ebp - 0x1c]
mov edx, 0x28
call fcn.004099e0
mov esi, eax
add esp, 8
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0x40d120
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x1c], 0
mov eax, dword [ebx]
mov dword [esi + 0x20], eax
mov dword [ebx], 0
mov eax, dword [edi + 4]
and eax, 0xfffffffc
mov edi, dword [eax + 8]
lock inc dword [edi + 0x18]
push esi
push 0
push 0
mov dword [esi + 0x1c], 1
push dword [edi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x40cebe
lea ebx, [edi + 0x38]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esi + 0x14], 0
mov eax, dword [edi + 0x58]
test eax, eax
je 0x40cea7
mov dword [eax + 0x14], esi
jmp 0x40ceaa
mov dword [edi + 0x54], esi
mov dword [edi + 0x58], esi
lea eax, [edi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
call fcn.0040cf10
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 4
Function at 0x40cf10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4294d0
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x4360e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 8]
test eax, eax
je 0x40cf5c
mov dword [ebp - 4], 0
mov eax, dword [eax + 0x20]
test eax, eax
je 0x40cf55
push 0
push eax
mov eax, dword [eax]
call eax
add esp, 8
mov dword [edi + 8], 0
mov esi, dword [edi + 4]
test esi, esi
je 0x40cf9f
push dword [0x43872c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40cf8f
mov edx, dword [eax + 4]
test edx, edx
je 0x40cf8f
xor eax, eax
nop dword [eax]
cmp dword [edx + eax*4], 0
lea ecx, [edx + eax*4]
je 0x40cfb0
inc eax
cmp eax, 2
jl 0x40cf80
push esi
call fcn.0040fde1
add esp, 4
mov dword [edi + 4], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov al, byte [esi + 0x28]
mov byte [esi], al
mov dword [ecx], esi
jmp 0x40cf98

Function at 0x40d3f0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [0x4384e0]
push esi
mov esi, dword [edx]
mov dword [edx + 4], ecx
push edi
mov edi, edx
test esi, esi
je 0x40d41d
movzx eax, byte [edi]
lea edi, [edi + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x431448]
sub esi, 1
jne 0x40d403
mov eax, 4
mov dword [edx + 4], ecx
pop edi
pop esi
cmp dword [edx], eax
jbe 0x40d442
nop dword [eax + eax]
movzx ecx, byte [eax + edx]
mov cl, byte [ecx + 0x4384f0]
mov byte [eax + edx], cl
inc eax
cmp eax, dword [edx]
jb 0x40d430
ret
Function at 0x40db80
Capabilities:
Check mutex on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4295bd
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x4360e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
push str.GlobalMT7628update_exe
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40dbe9
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f853
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
cmp eax, 1
jne 0x40dbf3
jmp 0x40dbcd
mov dword [ebp - 0x24], str.169.254.100.1
cmp eax, 2
jle 0x40dc05
mov eax, dword [esi + 8]
mov dword [ebp - 0x24], eax
push str.Wait..._not_close_n
call fcn.0040d3c0
push 0x431424
push dword [esi + 4]
call fcn.00414162
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x20], ebx
test ebx, ebx
jne 0x40dc2d
lea eax, [ebx + 2]
jmp 0x40dbcd
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
push 0xeffb
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.0040fa4b
add esp, 4
test eax, eax
je 0x40ddb7
lea edi, [eax + 0x23]
and edi, 0xffffffe0
push 0xefd8
push 0
push edi
lea esi, [edi + 0xefd8]
mov dword [edi - 4], eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], esi
call fcn.004119f0
mov dword [ebp - 0x18], esi
push ebx
push 0x40
push 1
mov dword [ebp - 4], 0
push edi
mov dword [0x4386f0], 0
call fcn.004189bc
push str.T6154A_APP
push edi
call fcn.00411190
add esp, 0x24
test eax, eax
jne 0x40dcc1
lea esi, [eax + 3]
jmp 0x40dd83
push ebx
push 0xefd8
push 1
push edi
call fcn.004189bc
mov ebx, eax
add esp, 0x10
xor edx, edx
test ebx, ebx
je 0x40dcf1
mov esi, dword [0x4386f0]
movzx ecx, byte [edi + edx]
inc edx
add esi, ecx
cmp edx, ebx
jb 0x40dce0
mov dword [0x4386f0], esi
cmp ebx, 0xefd8
jne 0x40dd10
lea eax, [ebp - 0x1c]
push eax
call fcn.0040de50
add dword [0x4384e4], ebx
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
jmp 0x40dcc1
jae 0x40dd2d
push ebx
lea ecx, [ebp - 0x1c]
call fcn.0040df10
lea eax, [ebp - 0x1c]
push eax
call fcn.0040de50
add dword [0x4384e4], ebx
mov edi, dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.004143ea
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
add esp, 4
mov byte [0x4384e8], 0
mov dword [ebp - 0x20], 0
push eax
sub esp, 0x10
call fcn.00407bf0
add esp, 0x14
cmp dword [ebp - 0x20], 0
jne 0x40dd65
mov esi, 4
jmp 0x40dd83
cmp byte [0x4384e8], 0
jne 0x40dd81
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call esi
cmp byte [0x4384e8], 0
je 0x40dd74
xor esi, esi
test edi, edi
je 0x40ddb0
mov ecx, dword [ebp - 0x14]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x40dda6
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ddb7
push ecx
push edi
call fcn.0040fde6
add esp, 8
mov eax, esi
jmp 0x40dbcd
call fcn.0041404f
int3
Function at 0x40efcb
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov esi, dword [ebp + 0xc]
neg eax
sbb eax, eax
xor ecx, ecx
and eax, dword [ebp - 4]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.0040efa7
pop esi
leave
ret 8

Function at 0x41050a
Capabilities:
Parse pe header

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

Function at 0x41aaf8
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42c944
push 0x42c93c
push str.FlsAlloc
push 0x1e
call fcn.0041a8f9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41ab2c
push dword [ebp + 8]
mov ecx, esi
call dword [0x42a1f4]
call esi
jmp 0x41ab32
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41ab76
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42c954
push 0x42c94c
push str.FlsGetValue
push 0x20
call fcn.0041a8f9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41abad
push dword [ebp + 8]
mov ecx, esi
call dword [0x42a1f4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41b726
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041b6a8
Function at 0x41daed
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 + 0x438278]
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 0x41db2d
cmp byte [ebx], 0xa
jne 0x41db2d
or byte [eax + edi + 0x28], 4
jmp 0x41db32
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x41dc30
mov al, byte [edx]
cmp al, 0x1a
je 0x41dc12
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x41db61
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41db86
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x41db90
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 0x41db43
jmp 0x41dc30
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 0x41dc0d
cmp dword [ebp - 0xc], 0
je 0x41dc0d
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x438278]
test byte [eax + edi + 0x28], 0x48
je 0x41dbe7
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41dbd2
mov byte [esi], dl
jmp 0x41dbe3
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x438278]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41dc30
cmp byte [ebp - 1], 0xa
jne 0x41dbf6
cmp esi, ebx
jne 0x41dbf6
mov byte [esi], 0xa
jmp 0x41dc2f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004248e4
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41dc30
mov byte [esi], 0xd
jmp 0x41dc2f
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x438278]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41dc2c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41dc30
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret