Function at 0x4030a0
Capabilities:
Read file on windows
Terminate thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417ee2
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1100
call fcn.00417c30
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10dc], edi
push str.Start_receive_from_Agent._r_n
call fcn.004027f0
add esp, 4
mov dword [ebp - 0x108c], 0
lea eax, [ebp - 0x108c]
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
movq qword [ebp - 0x20], xmm0
push 0
push eax
push 0xc
lea eax, [ebp - 0x20]
push eax
push dword [edi + 0x3c]
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x10e4], eax
call eax
test eax, eax
je 0x4039ef
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x10e8], eax
mov eax, dword [sym.imp.USER32.dll_wsprintfW]
mov dword [ebp - 0x10ec], eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x10fc], eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x10f4], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [ebp - 0x1100], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x1104], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [ebp - 0x10f8], eax
mov eax, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x10f0], eax
cmp byte [ebp - 0x20], 0x1c
jne 0x4039e2
mov ecx, dword [ebp - 0x1c]
lea esi, [ebp - 0x22]
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x4031a2
xor eax, eax
mov dword [ebp - 0x1098], edx
mov word [ebp - 0x10a8], ax
lea eax, [ebp - 0x22]
mov dword [ebp - 0x1094], 7
cmp esi, eax
je 0x4031f3
sub eax, esi
lea ecx, [ebp - 0x10a8]
sar eax, 1
push eax
push esi
call fcn.00402320
mov dword [ebp - 4], 0
mov al, byte [ebp - 0x1f]
cmp al, 0xe2
je 0x40364c
cmp al, 0xe4
je 0x40364c
cmp al, 0xe3
jne 0x403263
mov eax, dword [ebp - 0x18]
mov ecx, dword [edi + 0x8c]
mov dword [ebp - 0x1090], eax
movss xmm0, dword [ebp - 0x1090]
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x107c], eax
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x1088], xmm0
test ecx, ecx
je 0x403998
mov eax, dword [ecx]
lea edx, [ebp - 0x10a8]
push edx
lea edx, [ebp - 0x1088]
push edx
lea edx, [ebp - 0x107c]
push edx
call dword [eax + 8]
jmp 0x403924
cmp al, 0xe7
jne 0x403328
push str.Receive_UpdateToService_
call dword [ebp - 0x10e8]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x107c], esi
test esi, esi
jle 0x403924
push esi
call fcn.004168ef
add esp, 4
mov dword [ebp - 0x1084], eax
mov edi, eax
mov dword [ebp - 0x10c8], 0
push 0
lea eax, [ebp - 0x10c8]
push eax
mov eax, dword [ebp - 0x10dc]
push esi
push edi
push dword [eax + 0x3c]
call dword [ebp - 0x10e4]
mov eax, dword [ebp - 0x10c8]
test eax, eax
je 0x4032ce
sub esi, eax
add edi, eax
test esi, esi
jg 0x4032a2
mov edi, dword [ebp - 0x107c]
xor esi, esi
test edi, edi
jle 0x403306
nop word [eax + eax]
mov eax, dword [ebp - 0x1084]
movzx eax, byte [esi + eax]
push eax
push esi
lea eax, [ebp - 0x878]
push str._d__0x_02X
push eax
call dword [ebp - 0x10ec]
inc esi
add esp, 0x10
cmp esi, edi
jl 0x4032e0
mov eax, dword [ebp - 0x1084]
test eax, eax
je 0x403641
push eax
call fcn.004168fd
mov edi, dword [ebp - 0x10dc]
add esp, 4
jmp 0x403924
cmp al, 0xe8
jne 0x4033f8
push str.Receive_Uninstall_BI_Event_
call dword [ebp - 0x10e8]
mov esi, dword [ebp - 0x18]
mov byte [edi + 0xb8], 1
mov dword [ebp - 0x107c], esi
test esi, esi
jle 0x403924
push esi
call fcn.004168ef
add esp, 4
mov dword [ebp - 0x1084], eax
mov edi, eax
mov dword [ebp - 0x10cc], 0
nop
push 0
lea eax, [ebp - 0x10cc]
push eax
mov eax, dword [ebp - 0x10dc]
push esi
push edi
push dword [eax + 0x3c]
call dword [ebp - 0x10e4]
mov eax, dword [ebp - 0x10cc]
test eax, eax
je 0x40339c
sub esi, eax
add edi, eax
test esi, esi
jg 0x403370
mov edi, dword [ebp - 0x107c]
xor esi, esi
test edi, edi
jle 0x4033d6
nop dword [eax + eax]
mov eax, dword [ebp - 0x1084]
movzx eax, byte [esi + eax]
push eax
push esi
lea eax, [ebp - 0x878]
push str._d__0x_02X
push eax
call dword [ebp - 0x10ec]
inc esi
add esp, 0x10
cmp esi, edi
jl 0x4033b0
mov eax, dword [ebp - 0x1084]
test eax, eax
je 0x403641
push eax
call fcn.004168fd
mov edi, dword [ebp - 0x10dc]
add esp, 4
jmp 0x403924
cmp al, 0xe9
jne 0x4034ad
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x107c], esi
test esi, esi
jle 0x403924
push esi
call fcn.004168ef
add esp, 4
mov dword [ebp - 0x1084], eax
mov edi, eax
mov dword [ebp - 0x10d0], 0
nop dword [eax]
push 0
lea eax, [ebp - 0x10d0]
push eax
mov eax, dword [ebp - 0x10dc]
push esi
push edi
push dword [eax + 0x3c]
call dword [ebp - 0x10e4]
mov eax, dword [ebp - 0x10d0]
test eax, eax
je 0x40345c
sub esi, eax
add edi, eax
test esi, esi
jg 0x403430
cmp dword [ebp - 0x107c], 8
mov esi, dword [ebp - 0x1084]
jl 0x403491
mov ecx, dword [0x420cfc]
test ecx, ecx
je 0x403491
cmp dword [esi + 4], 0
je 0x403491
mov eax, dword [0x420d30]
test eax, eax
je 0x403491
cmp dword [ecx + 4], 0
je 0x403491
push eax
call dword [ebp - 0x10f8]
test esi, esi
je 0x403641
push esi
call fcn.004168fd
mov edi, dword [ebp - 0x10dc]
add esp, 4
jmp 0x403924
cmp al, 0xea
jne 0x40399e
push str.Receive_GiftBoxServiceUpdate_
call dword [ebp - 0x10e8]
mov esi, dword [ebp - 0x18]
xor edi, edi
mov dword [ebp - 0x1084], esi
test esi, esi
jle 0x403555
push esi
call fcn.004168ef
add esp, 4
mov dword [ebp - 0x10e0], eax
mov edi, eax
mov dword [ebp - 0x10d4], 0
nop
push 0
lea eax, [ebp - 0x10d4]
push eax
mov eax, dword [ebp - 0x10dc]
push esi
push edi
push dword [eax + 0x3c]
call dword [ebp - 0x10e4]
mov eax, dword [ebp - 0x10d4]
test eax, eax
je 0x40351c
sub esi, eax
add edi, eax
test esi, esi
jg 0x4034f0
mov edi, dword [ebp - 0x10e0]
xor esi, esi
cmp dword [ebp - 0x1084], esi
jle 0x403555
nop dword [eax]
movzx eax, byte [esi + edi]
push eax
push eax
push esi
lea eax, [ebp - 0x1078]
push str._d__0x_02X____c
push eax
call dword [ebp - 0x10ec]
inc esi
add esp, 0x14
cmp esi, dword [ebp - 0x1084]
jl 0x403530
mov esi, dword [ebp - 0x10dc]
add esi, 0xbc
push esi
call dword [ebp - 0x10fc]
cmp byte [0x420d2c], 0
push esi
jne 0x40362e
mov byte [0x420d2c], 1
call dword [ebp - 0x10f4]
push 0x800
call fcn.004168ef
add esp, 4
mov dword [ebp - 0x1084], eax
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, edi
add esp, 0xc
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4035b0
push 0
push 0
sub esi, ecx
push esi
push edi
push 0
push 0xfde9
call dword [ebp - 0x10f0]
mov dword [ebp - 0x107c], eax
lea ecx, [eax + 1]
cmp ecx, 0x400
jg 0x403607
push eax
push dword [ebp - 0x1084]
push esi
push edi
push 0
push 0xfde9
call dword [ebp - 0x10f0]
mov esi, dword [ebp - 0x1084]
xor ecx, ecx
mov eax, dword [ebp - 0x107c]
mov word [esi + eax*2], cx
jmp 0x40360d
mov esi, dword [ebp - 0x1084]
push esi
call dword [ebp - 0x1100]
test eax, eax
je 0x403634
push 0
push 0
push esi
push 0x403020
push 0
push 0
call dword [ebp - 0x1104]
jmp 0x403634
call dword [ebp - 0x10f4]
test edi, edi
je 0x403641
push edi
call fcn.004168fd
add esp, 4
mov edi, dword [ebp - 0x10dc]
jmp 0x403924
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x107c], edi
push 0x5c
cmp al, 0xe2
jne 0x40368f
call fcn.00416902
mov esi, eax
add esp, 4
mov dword [ebp - 0x1108], esi
push 0x5c
push 0
push esi
mov byte [ebp - 4], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, esi
push 2
call fcn.0040b6a0
mov esi, eax
mov dword [ebp - 0x10e0], esi
jmp 0x4036c1
call fcn.00416902
mov esi, eax
add esp, 4
mov dword [ebp - 0x110c], esi
push 0x5c
push 0
push esi
mov byte [ebp - 4], 2
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, esi
push 3
call fcn.0040b6a0
mov esi, eax
mov dword [ebp - 0x10e0], eax
sub esp, 0x18
mov byte [ebp - 4], 0
lea eax, [ebp - 0x10a8]
mov ecx, esp
push eax
call fcn.00404370
mov ecx, esi
call fcn.0040c1a0
mov dword [ebp - 0x1084], 0
test edi, edi
jle 0x40373c
push edi
call fcn.004168ef
mov esi, dword [ebp - 0x107c]
add esp, 4
mov dword [ebp - 0x1084], eax
mov edi, eax
mov dword [ebp - 0x10d8], 0
nop dword [eax]
push 0
lea eax, [ebp - 0x10d8]
push eax
mov eax, dword [ebp - 0x10dc]
push esi
push edi
push dword [eax + 0x3c]
call dword [ebp - 0x10e4]
mov eax, dword [ebp - 0x10d8]
test eax, eax
je 0x40373c
sub esi, eax
add edi, eax
test esi, esi
jg 0x403710
xorps xmm0, xmm0
mov dword [ebp - 0x10ac], 0
lea ecx, [ebp - 0x10c4]
movq qword [ebp - 0x10b4], xmm0
movups xmmword [ebp - 0x10c4], xmm0
call fcn.00415430
push str.Result
lea ecx, [ebp - 0x10c4]
mov byte [ebp - 4], 3
call fcn.004158f0
mov edi, eax
lea esi, [ebp - 0x4e]
mov ecx, 3
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x403781
xor eax, eax
mov dword [ebp - 0x2c], edx
mov word [ebp - 0x3c], ax
mov ecx, 7
lea eax, [ebp - 0x4e]
mov dword [ebp - 0x28], ecx
cmp esi, eax
je 0x4037ca
sub eax, esi
lea ecx, [ebp - 0x3c]
sar eax, 1
push eax
push esi
call fcn.00402320
mov ecx, dword [ebp - 0x28]
cmp ecx, 8
mov byte [ebp - 4], 4
lea eax, [ebp - 0x3c]
mov ecx, edi
cmovae eax, dword [ebp - 0x3c]
push eax
call fcn.00416270
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x28]
cmp edx, 8
jb 0x40381e
mov ecx, dword [ebp - 0x3c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403814
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4039dc
push edx
push ecx
call fcn.00416baa
add esp, 8
mov esi, dword [edi + 4]
mov edi, dword [ebp - 0x10c4]
mov eax, dword [esi + 4]
cmp eax, dword [edi + 4]
jne 0x403861
push esi
call fcn.00412040
mov eax, dword [edi + 0x20]
test eax, eax
je 0x40384a
mov dword [eax + 0x28], esi
mov eax, dword [edi + 0x20]
mov dword [esi + 0x24], eax
mov dword [edi + 0x20], esi
jmp 0x403857
mov dword [edi + 0x20], esi
mov dword [edi + 0x1c], esi
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 8], edi
mov edi, dword [ebp - 0x10e0]
lea ecx, [ebp - 0x10c4]
mov esi, dword [edi]
call fcn.00415800
push eax
mov ecx, edi
call dword [esi + 0x14]
mov edi, dword [ebp - 0x107c]
mov esi, dword [ebp - 0x10e0]
test edi, edi
jle 0x4038c9
mov eax, dword [esi + 0x24]
test eax, eax
je 0x4038a1
push eax
call fcn.004168fd
add esp, 4
mov dword [esi + 0x24], 0
cmp dword [ebp - 0x1084], 0
je 0x4038c9
push edi
call fcn.004168ef
add esp, 4
mov dword [esi + 0x24], eax
push edi
push dword [ebp - 0x1084]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [esi + 0x28], edi
cmp byte [ebp - 0x1f], 0xe2
mov edi, dword [ebp - 0x10dc]
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x107c], eax
jne 0x4038e3
mov ecx, dword [edi + 0x64]
jmp 0x4038e9
mov ecx, dword [edi + 0xb4]
test ecx, ecx
je 0x403998
mov eax, dword [ecx]
lea edx, [ebp - 0x107c]
push esi
push edx
call dword [eax + 8]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov eax, dword [ebp - 0x1084]
test eax, eax
je 0x403919
push eax
call fcn.004168fd
add esp, 4
lea ecx, [ebp - 0x10c4]
call fcn.004154d0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1094]
cmp eax, 8
jb 0x403967
mov ecx, dword [ebp - 0x10a8]
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40395d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4039dc
push edx
push ecx
call fcn.00416baa
add esp, 8
push 0
lea eax, [ebp - 0x108c]
mov dword [ebp - 0x18], 0
push eax
push 0xc
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
push dword [edi + 0x3c]
movq qword [ebp - 0x20], xmm0
call dword [ebp - 0x10e4]
test eax, eax
jne 0x403192
jmp 0x4039ef
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
mov eax, dword [ebp - 0x1094]
cmp eax, 8
jb 0x4039ef
mov ecx, dword [ebp - 0x10a8]
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4039d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4039dc
push edx
push ecx
call fcn.00416baa
add esp, 8
jmp 0x4039ef
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push str.invalid_header_from_agent._r_n
call fcn.004027f0
add esp, 4
mov eax, dword [edi + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x403a07
push eax
call esi
mov dword [edi + 0x38], 0xffffffff
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x403a19
push eax
call esi
mov dword [edi + 0x3c], 0xffffffff
mov eax, dword [edi + 0x30]
cmp eax, 0xffffffff
je 0x403a4b
push 0xbb8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x403a3f
push 0
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi + 0x30]
call esi
mov dword [edi + 0x30], 0xffffffff
push str.Stop_receive_from_Agent._r_n
call fcn.004027f0
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret