joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41f0a0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x49c33c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
push 0x3a
push dword [esi + 0x10]
call fcn.00434ea0
mov edi, eax
add esp, 8
test edi, edi
je 0x41f26c
mov ecx, edi
sub ecx, dword [esi + 0x10]
cmp ecx, 0x100
jae 0x41f26c
lea eax, [ebp - 0x118]
push eax
lea eax, [edi + 1]
push 0x4886b0
push eax
call fcn.004011d0
add esp, 0xc
cmp eax, 1
jne 0x41f26c
mov eax, dword [esi + 0x10]
sub edi, eax
push edi
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004323f0
add esp, 0xc
cmp edi, 0x100
jae 0x41f288
lea eax, [ebp - 0x104]
mov byte [ebp + edi - 0x104], 0
push eax
call sub.WSOCK32.dll_gethostbyname
mov ebx, eax
test ebx, ebx
je 0x41f26c
cmp word [ebx + 8], 2
jne 0x41f26c
push dword [ebp - 0x118]
mov eax, 2
mov word [ebp - 0x114], ax
call sub.WSOCK32.dll_htons
mov word [ebp - 0x112], ax
nop word [eax + eax]
mov eax, dword [ebx + 0xc]
xor edi, edi
cmp dword [eax], edi
je 0x41f1e3
xor ecx, ecx
nop dword [eax + eax]
mov eax, dword [ecx + eax]
push 0
push 1
push 2
mov eax, dword [eax]
mov dword [ebp - 0x110], eax
call sub.WSOCK32.dll_socket
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x41f259
push 0x10
lea ecx, [ebp - 0x114]
push ecx
push eax
call sub.WSOCK32.dll_connect
test eax, eax
je 0x41f201
call sub.WSOCK32.dll_WSAGetLastError
push dword [esi + 8]
mov dword [esi + 0xc], eax
call sub.WSOCK32.dll_closesocket
cmp dword [esi + 0xc], 0x274d
jne 0x41f273
mov eax, dword [ebx + 0xc]
inc edi
lea ecx, [edi*4]
cmp dword [ecx + eax], 0
jne 0x41f180
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp + 8], eax
test eax, eax
jle 0x41f263
imul eax, dword [ebp + 0xc], 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41f170
push 4
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], 1
push eax
push 1
push 6
push dword [esi + 8]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x41f236
call sub.WSOCK32.dll_WSAGetLastError
push dword [esi + 8]
mov dword [esi + 0xc], eax
call sub.WSOCK32.dll_closesocket
jmp 0x41f273
pop edi
mov dword [esi + 0xc], 0
mov al, 1
mov dword [esi + 4], 0
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f865
mov esp, ebp
pop ebp
ret 0xc
call sub.WSOCK32.dll_WSAGetLastError
mov dword [esi + 0xc], eax
jmp 0x41f273
mov dword [esi + 0xc], 0xfffffffd
jmp 0x41f273
mov dword [esi + 0xc], 0xfffffffe
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042f865
mov esp, ebp
pop ebp
ret 0xc
call fcn.0043024a
int3
Function at 0x41f800
Capabilities:
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x49c33c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
push 0x3a
push dword [esi + 0x10]
call fcn.00434ea0
mov edi, eax
add esp, 8
test edi, edi
je 0x41f9a0
lea eax, [ebp - 0x118]
push eax
lea ecx, [edi + 1]
push 0x4886b0
push ecx
call fcn.004011d0
add esp, 0xc
cmp eax, 1
jne 0x41f9a0
mov eax, dword [esi + 0x10]
sub edi, eax
push edi
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004323f0
add esp, 0xc
cmp edi, 0x100
jae 0x41f9bb
push 0
push 1
push 2
mov byte [ebp + edi - 0x104], 0
call sub.WSOCK32.dll_socket
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x41f8a8
call sub.WSOCK32.dll_WSAGetLastError
mov dword [esi + 0xc], eax
xor al, al
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f865
mov esp, ebp
pop ebp
ret 4
cmp byte [ebp - 0x104], 0
mov eax, 2
mov word [ebp - 0x114], ax
je 0x41f8fd
lea eax, [ebp - 0x104]
push str.localhost
push eax
call fcn.00469d69
add esp, 8
test eax, eax
je 0x41f8fd
lea eax, [ebp - 0x104]
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x41f9a0
cmp word [eax + 8], 2
jne 0x41f9a0
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x41f904
push 0
call sub.WSOCK32.dll_htonl
push dword [ebp - 0x118]
mov dword [ebp - 0x110], eax
call sub.WSOCK32.dll_htons
push 4
mov word [ebp - 0x112], ax
lea eax, [ebp - 0x11c]
push eax
push 4
push 0xffff
push dword [esi + 8]
mov dword [ebp - 0x11c], 1
call sub.WSOCK32.dll_setsockopt
push 0x10
lea eax, [ebp - 0x114]
push eax
push dword [esi + 8]
call sub.WSOCK32.dll_bind
test eax, eax
je 0x41f977
call sub.WSOCK32.dll_WSAGetLastError
push dword [esi + 8]
mov dword [esi + 0xc], eax
call sub.WSOCK32.dll_closesocket
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f865
mov esp, ebp
pop ebp
ret 4
push dword [ebp + 8]
push dword [esi + 8]
call sub.WSOCK32.dll_listen
test eax, eax
jne 0x41f953
mov dword [esi + 0xc], eax
mov dword [esi + 4], eax
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f865
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor al, al
pop edi
mov dword [esi + 0xc], 0xfffffffe
xor ecx, ebp
pop esi
call fcn.0042f865
mov esp, ebp
pop ebp
ret 4
call fcn.0043024a
int3
Function at 0x41fc00
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x49c33c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push esi
xor esi, esi
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x124], eax
movlpd qword [ebp - 0x120], xmm0
cmp dword [ecx + 4], esi
je 0x41fc50
mov dword [ecx + 0xc], 0xffffffff
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f865
mov esp, ebp
pop ebp
ret 0x14
push ebx
mov ebx, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x14]
mov eax, edi
and eax, ebx
cmp eax, 0xffffffff
je 0x41fc79
push 0
call fcn.00461bfb
mov ecx, dword [ebp - 0x10c]
add esp, 4
mov dword [ebp - 0x114], edx
jmp 0x41fc8b
mov eax, dword [ebp - 0x11c]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x110], eax
mov eax, edi
and eax, ebx
cmp eax, 0xffffffff
je 0x41fd4a
mov eax, dword [ecx + 8]
lea ecx, [ebp - 0x12c]
push ecx
push 0
push 0
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x104], eax
push ecx
inc eax
mov dword [ebp - 0x108], 1
push eax
mov dword [ebp - 0x12c], edi
mov dword [ebp - 0x128], 0
call sub.WSOCK32.dll_select
test eax, eax
js 0x41fda5
je 0x41fd81
push 0
call fcn.00461bfb
mov dword [ebp - 0x118], edx
add esp, 4
mov edx, dword [ebp - 0x110]
mov ecx, eax
mov eax, dword [ebp - 0x114]
add edx, edi
mov dword [ebp - 0x11c], ecx
adc eax, ebx
cmp eax, dword [ebp - 0x118]
jl 0x41fd3c
jg 0x41fd1e
cmp edx, ecx
jb 0x41fd3c
mov ecx, dword [ebp - 0x110]
sub ecx, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x114]
sbb eax, dword [ebp - 0x118]
add edi, ecx
adc ebx, eax
jmp 0x41fd4a
xorps xmm0, xmm0
movlpd qword [ebp + 0x14], xmm0
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
sub eax, esi
push 0
push eax
mov eax, dword [ebp - 0x124]
add eax, esi
push eax
mov eax, dword [ebp - 0x10c]
push dword [eax + 8]
call sub.WSOCK32.dll_recv
test eax, eax
js 0x41fda5
je 0x41fd96
add esi, eax
cmp esi, dword [ebp + 0xc]
jae 0x41fd81
mov ecx, dword [ebp - 0x10c]
jmp 0x41fc91
pop edi
pop ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f865
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp - 0x10c]
mov dword [eax + 0xc], 0xfffffffc
jmp 0x41fdb3
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [ebp - 0x10c]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.0042f865
mov esp, ebp
pop ebp
ret 0x14
Function at 0x41ffa0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
cmp dword [ebx + 4], 0
je 0x41ffba
mov dword [ebx + 0xc], 0xffffffff
xor al, al
pop ebx
pop ebp
ret 8
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0
push esi
push edi
push dword [ebx + 8]
call sub.WSOCK32.dll_send
test eax, eax
js 0x41fff3
je 0x41ffe3
add edi, eax
sub esi, eax
jne 0x41ffc2
pop edi
pop esi
mov al, 1
pop ebx
pop ebp
ret 8
pop edi
pop esi
mov dword [ebx + 0xc], 0xfffffffc
xor al, al
pop ebx
pop ebp
ret 8
call sub.WSOCK32.dll_WSAGetLastError
pop edi
mov dword [ebx + 0xc], eax
xor al, al
pop esi
pop ebx
pop ebp
ret 8
Function at 0x420010
Capabilities:
Allocate thread local storage
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x486778
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x49c33c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp + 8]
lea ecx, [ebx + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx], vtable.dbDatabase.0
mov dword [ebx + 0x14], eax
call fcn.0042ef10
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [ebx + 0x38], eax
lea ecx, [ebx + 0x98]
mov byte [ebp - 4], 1
call fcn.0042f3a0
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea esi, [ebx + 0x108]
mov dword [ebx + 0xac], 0
mov dword [ebx + 0xb0], 0
mov dword [ebx + 0xb4], 0
mov dword [ebx + 0xbc], 0
mov dword [ebx + 0xc4], 0
mov dword [ebx + 0xc8], 0
mov dword [ebx + 0xcc], 0
mov dword [ebx + 0xd0], 0
push esi
mov dword [ebx + 0xd4], 0
call edi
mov byte [esi + 0x18], 1
lea esi, [ebx + 0x124]
push esi
call edi
mov byte [esi + 0x18], 1
mov dword [ebx + 0x140], 0
lea esi, [ebx + 0x14c]
mov dword [ebx + 0x144], 0
push esi
mov dword [ebx + 0x148], 0
call edi
mov byte [esi + 0x18], 1
mov dword [ebx + 0x168], 0
mov dword [ebx + 0x17c], 0
mov dword [ebx + 0x180], 0
lea eax, [ebx + 0x188]
mov dword [eax + 4], eax
mov dword [eax], eax
lea esi, [ebx + 0x190]
push esi
call edi
mov byte [esi + 0x18], 1
push 0x8008
mov byte [ebp - 4], 8
call fcn.0042f8b9
mov dword [ebx + 0xe0], eax
add esp, 4
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x420188
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x20]
mov ecx, 0x40
mov dword [ebx + 0xdc], 0
cmp eax, ecx
mov dword [ebx + 0xf0], 0
mov dword [ebx + 0xf4], 0
cmova eax, ecx
mov dword [ebx + 0xf8], 0
mov dword [ebx + 0x50], eax
mov eax, ebx
mov dword [ebx + 0xfc], 0
mov dword [ebx + 0x100], 0
mov dword [ebx + 0x104], 0
mov dword [ebx + 0x16c], 0
mov dword [ebx + 0x170], 0
mov dword [ebx + 0x174], 0
mov dword [ebx + 0x6c], 0
mov dword [ebx + 0x74], 0
mov byte [ebx + 0xe4], 0
mov dword [ebx + 0x90], 0
mov dword [ebx + 0x1ac], 0
mov byte [ebx + 0x1b8], 0
mov dword [ebx + 0x1b0], 0
mov dword [ebx + 0x1b4], 0
mov dword [ebx + 0x40], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x421590
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4867c5
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x49c33c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x421676
push 0xf8
call fcn.0042f87b
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 0
test edi, edi
je 0x421633
mov dword [edi + 4], edi
mov dword [edi], edi
lea eax, [edi + 0x18]
mov dword [eax + 4], eax
mov dword [eax], eax
lea ecx, [edi + 0x20]
mov byte [ebp - 4], 2
call fcn.00418630
mov dword [edi + 0x10], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0xb4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi + 0xb0], eax
jmp 0x421635
xor edi, edi
cmp byte [ebx + 0x1a8], 0
lea esi, [ebx + 0x190]
je 0x42164b
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebx + 0x188]
mov dword [edi + 4], ecx
mov eax, dword [ecx]
mov dword [edi], eax
mov eax, dword [ecx]
mov dword [eax + 4], edi
mov dword [ecx], edi
cmp byte [esi + 0x18], 0
je 0x42166c
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4222e0
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0xd8]
mov eax, dword [eax + 0x38]
cmp dword [esi + 0x78], eax
je 0x4223a2
push eax
mov eax, dword [esi + 0x70]
add eax, dword [esi + 0x6c]
push 0x488f28
push eax
call fcn.00406100
add esp, 0xc
cmp dword [esi + 0x78], 0
jne 0x422361
mov eax, dword [esi + 8]
test eax, eax
je 0x422320
cmp eax, 2
je 0x422320
xor al, al
jmp 0x422322
mov al, 1
push 0
push dword [esi + 0x7c]
lea ecx, [esi + 0x98]
push eax
push dword [esi + 0x6c]
push dword [esi + 0x74]
call fcn.0042f520
test eax, eax
je 0x42238a
mov eax, dword [esi]
mov ecx, esi
push 0
push str.Failed_to_open_database_file
push 4
call dword [eax]
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
mov ecx, esi
call fcn.00423960
xor al, al
pop esi
ret
mov eax, dword [esi + 0x40]
lea ecx, [esi + 0x98]
push 0
push dword [esi + 0x6c]
push dword [eax]
call fcn.0042f700
test eax, eax
je 0x42238a
mov edx, dword [esi]
mov ecx, esi
push eax
push str.Failed_to_reopen_database_file
push 5
call dword [edx]
jmp 0x42234c
mov eax, dword [esi + 0xd8]
mov eax, dword [eax + 0x38]
mov dword [esi + 0x78], eax
mov eax, dword [esi + 0xa4]
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov al, 1
pop esi
ret
Function at 0x422c80
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, ecx
push dword [edi + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
je 0x422da9
cmp byte [ebx + 0xb6], 0
jne 0x422da9
cmp dword [ebx + 0xc], 0
je 0x422ccb
mov eax, dword [edi + 0xd8]
mov eax, dword [eax + 0x40]
cmp eax, dword [ebx + 0xb0]
je 0x422ccb
mov eax, dword [edi]
mov ecx, edi
push 0
push 0
push 9
call dword [eax]
mov eax, dword [edi + 0xb8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
je 0x422ce8
push 0xffffffffffffffff
push dword [edi + 0xb4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [edi + 0x54], 0
je 0x422d1a
mov ecx, dword [edi + 0xd8]
cmp dword [ecx + 0x2c], 0
jne 0x422d1a
cmp dword [ecx + 0x24], 0
jne 0x422d14
cmp dword [ebx + 0xc], 0
jne 0x422d14
cmp dword [ebx + 0x14], 0
jne 0x422d14
mov eax, dword [ebx + 0x10]
cmp eax, dword [ecx + 0x30]
jne 0x422d1a
mov byte [ebp - 1], 1
jmp 0x422d1e
mov byte [ebp - 1], 0
mov eax, dword [edi + 0xb8]
mov ecx, 1
lock xadd dword [eax], ecx
inc ecx
test ecx, ecx
jg 0x422d3e
push dword [edi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp byte [ebp - 1], 0
mov eax, dword [ebx + 0xc]
je 0x422dbd
test eax, eax
jne 0x422d5a
cmp dword [ebx + 0x14], eax
mov ecx, edi
setne al
inc eax
push eax
call fcn.00421ce0
mov eax, dword [edi + 0xf0]
or eax, dword [edi + 0xf4]
je 0x422daf
cmp byte [edi + 0x120], 0
push esi
lea esi, [edi + 0x108]
je 0x422d7f
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0xd8]
mov dword [eax + 0x44], ebx
mov byte [ebx + 0xb6], 1
push dword [edi + 0x140]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp byte [esi + 0x18], 0
je 0x422da8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
mov ecx, edi
call fcn.00422740
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x422dcb
cmp dword [ebx + 8], eax
jne 0x422dcb
cmp dword [ebx + 0x14], eax
je 0x422da9
push ebx
mov ecx, edi
call fcn.00423960
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4235c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
test byte [ebp + 8], 1
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, ecx
je 0x4235da
call fcn.00422c80
jmp 0x423612
mov eax, dword [ebx + 0xd8]
mov dword [eax + 0x24], 1
push dword [ebx + 0x38]
call esi
mov ecx, eax
test ecx, ecx
je 0x423612
cmp dword [ecx + 0xc], 0
jne 0x4235fe
cmp dword [ecx + 8], 0
je 0x423612
mov eax, dword [ebx + 0xd8]
push ecx
mov eax, dword [eax + 0x30]
mov dword [ecx + 0x10], eax
mov ecx, ebx
call fcn.00423960
test byte [ebp + 8], 2
je 0x423749
push edi
push dword [ebx + 0x38]
call esi
mov ecx, dword [ebx + 0xf0]
mov edi, eax
or ecx, dword [ebx + 0xf4]
mov dword [ebp + 8], edi
je 0x4236dc
cmp byte [ebx + 0x13c], 0
lea esi, [ebx + 0x124]
mov ecx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
je 0x423657
push esi
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xd8]
cmp dword [eax + 0x44], edi
jne 0x423677
cmp byte [edi + 0xb6], 0
je 0x423677
mov byte [edi + 0xb7], 1
jmp 0x423730
cmp byte [ebx + 0x1a8], 0
lea edi, [ebx + 0x190]
je 0x423689
push edi
call ecx
mov edx, dword [ebp + 8]
test edx, edx
je 0x4236cd
mov ecx, dword [edx + 0x18]
add edx, 0x18
push 0xf8
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx + 4], edx
mov dword [edx], edx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx + 4], edx
mov dword [edx], edx
call fcn.0042f8ab
add esp, 8
cmp byte [edi + 0x18], 0
je 0x423730
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x423730
cmp byte [ebx + 0x1a8], 0
lea esi, [ebx + 0x190]
je 0x4236f2
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test edi, edi
je 0x423730
mov ecx, dword [edi + 0x18]
lea edx, [edi + 0x18]
mov eax, dword [edx + 4]
push 0xf8
push edi
mov dword [ecx + 4], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx + 4], edx
mov dword [edx], edx
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov dword [ecx], eax
mov dword [edi + 4], edi
mov dword [edi], edi
call fcn.0042f8ab
add esp, 8
cmp byte [esi + 0x18], 0
je 0x42373d
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x426a10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0xc], edi
mov eax, dword [edi + 0x40]
mov ebx, dword [eax]
mov dword [ebp - 4], ebx
cmp esi, ebx
jbe 0x426b48
mov eax, dword [edi + 0x90]
test eax, eax
je 0x426a49
cmp esi, eax
jbe 0x426a49
mov eax, dword [edi]
push 0
push 0
push 0xa
call dword [eax]
push dword [edi + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp + 8], eax
cmp dword [eax + 0x14], 0
je 0x426a6a
cmp dword [eax + 0xc], 0
jne 0x426a6a
push 2
mov ecx, edi
call fcn.00421ce0
add ebx, ebx
cmp ebx, esi
jbe 0x426a88
mov eax, dword [edi + 0x90]
test eax, eax
je 0x426a86
cmp ebx, eax
jbe 0x426a86
cmp eax, esi
jbe 0x426a88
mov esi, eax
jmp 0x426a88
mov esi, ebx
mov eax, dword [edi + 0x40]
push esi
push dword [eax]
push str.Extend_database_file_from__ld_to__ld_bytes_n
call fcn.0041a150
mov eax, dword [edi + 0x40]
mov dword [eax], esi
mov ecx, dword [edi + 0xd8]
mov eax, dword [ecx + 0x38]
inc eax
mov dword [ecx + 0x38], eax
push eax
mov dword [edi + 0x78], eax
mov eax, dword [edi + 0x70]
add eax, dword [edi + 0x6c]
push 0x488f28
push eax
call fcn.00406100
add esp, 0x18
lea ecx, [edi + 0x98]
push 1
push dword [edi + 0x6c]
push esi
call fcn.0042f700
test eax, eax
je 0x426ae5
mov edx, dword [edi]
mov ecx, edi
push eax
push str.Failed_to_extend_file
push 5
call dword [edx]
mov edx, dword [edi + 0xa4]
mov ebx, edx
mov ecx, dword [edi + 0x3c]
mov dword [ebp - 0x10], edx
mov dword [ebp - 8], ecx
sub ebx, ecx
je 0x426b48
mov eax, dword [ebp + 8]
add eax, 0x18
mov dword [ebp + 8], eax
mov esi, dword [eax]
cmp esi, eax
je 0x426b39
mov edi, dword [ebp - 4]
nop dword [eax]
cmp dword [esi + 0x38], 0
je 0x426b2d
push ebx
push edi
push ecx
mov ecx, dword [esi + 0xc]
push dword [esi + 0x3c]
mov ecx, dword [ecx + 0x10]
call fcn.00416190
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
mov esi, dword [esi]
cmp esi, eax
jne 0x426b10
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [edi + 0x3c], edx
add dword [edi + 0x48], ebx
add dword [edi + 0x4c], ebx
add dword [edi + 0x44], ebx
mov dword [edi + 0x40], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x429460
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, ecx
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
test edx, edx
je 0x429492
cmp dword [edx + 0xc], 0
jne 0x42947e
cmp dword [edx + 8], 0
je 0x429492
mov eax, dword [esi + 0xd8]
mov ecx, esi
push edx
mov eax, dword [eax + 0x30]
mov dword [edx + 0x10], eax
call fcn.00423960
pop esi
ret

Function at 0x4298a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
push edi
push esi
mov byte [ebx + 0x54], 1
call fcn.00429b10
mov esi, dword [esi + 0x14]
test esi, esi
je 0x4298dd
push dword [esi + 0x44]
push dword [esi + 0x58]
push dword [esi + 0x38]
push edi
push dword [esi + 0x50]
push ebx
call fcn.0040fa40
mov esi, dword [esi + 0xc]
add esp, 0x18
test esi, esi
jne 0x4298c0
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x18]
test esi, esi
je 0x42990a
push dword [esi + 0x44]
push dword [esi + 0x64]
push dword [esi + 0x58]
push dword [esi + 0x38]
push edi
push dword [esi + 0x54]
push ebx
call fcn.0042c5d0
mov esi, dword [esi + 0x10]
add esp, 0x1c
test esi, esi
jne 0x4298e7
mov eax, dword [ebp + 8]
push edi
push dword [eax + 0xc]
mov ecx, ebx
call fcn.00426e50
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x429942
lea ecx, [eax + 0x18]
mov eax, dword [ecx]
cmp eax, ecx
je 0x429942
nop dword [eax + eax]
cmp dword [eax + 0x38], edi
jne 0x42993c
mov dword [eax + 0x38], 0
mov eax, dword [eax]
cmp eax, ecx
jne 0x429930
pop edi
pop esi
pop ebx
pop ebp
ret 8