Function at 0x405310
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4462b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
lea eax, [ecx + 0x1000]
cmp eax, 0x2000
jb 0x405a1b
mov edx, dword [ebp + 0x1c]
mov dword [ecx], 0
test edx, edx
je 0x405363
mov eax, dword [ebp + 0x20]
add eax, 0x1000
cmp eax, 0x2000
jb 0x405a1b
cmp edx, 0x2000
jae 0x405a02
cmp dword [ebp + 0x38], 0x100000
jae 0x405a02
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0x10], ecx
cmp ecx, 0x80
ja 0x405a02
lea esi, [edx*4]
lea eax, [esi + 0x10c8]
mov dword [ebp - 8], eax
mov edx, eax
mov eax, dword [ebp + 0x10]
and eax, 0x400
mov dword [ebp - 0x14], eax
or eax, 0
je 0x4053a6
add edx, esi
mov edi, dword [ebp + 0x2c]
test ecx, ecx
jne 0x40546d
add edx, 0x3f
and edx, 0xffffffc0
mov esi, edx
add edx, 0x20040
push str.may_leak:log_instance
push edx
call fcn.0040af60
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4059e7
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x10]
mov dword [ebx + 0x10c4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp + 0x30]
push 0x10
mov dword [ebx + 0x30], eax
lea eax, [ebx + 0x80]
push 0
push eax
mov dword [ebx], 0x19320731
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x20], 0xd
mov dword [ebx + 0x24], 0x10c8
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0
mov byte [ebx + 0x50], 1
mov byte [ebx + 0x53], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
call sym.rdtsc.exe_nocrt_memset
mov eax, dword [ebp + 0x1c]
add esp, 0xc
mov dword [ebx + 0x54], eax
mov eax, dword [ebp + 0x20]
mov dword [ebx + 0x58], eax
mov eax, dword [ebp - 0x14]
or eax, 0
je 0x40556d
mov eax, dword [ebp - 8]
add eax, ebx
jmp 0x40556f
lea eax, [edi + 0x1000]
cmp eax, 0x2000
jb 0x405a1b
cmp dword [edi + 0x10], 0
je 0x40548b
xor esi, esi
mov dword [ebp - 0xc], esi
jmp 0x405496
add edx, 0x3f
and edx, 0xffffffc0
mov esi, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x18], 0
test ecx, ecx
je 0x4053bf
mov ebx, dword [ebp - 0xc]
lea ecx, [edi + 8]
jmp 0x4054b0
cmp dword [ecx - 8], 0x19281207
jne 0x405554
cmp dword [ecx - 4], 0
jne 0x4054f4
mov edi, dword [ecx]
lea eax, [edi - 0x400]
cmp eax, 0x3fffc00
ja 0x405a02
cmp dword [ecx + 4], 0
jne 0x4054f4
mov esi, dword [ecx + 8]
test ebx, ebx
je 0x40550d
lea eax, [edi + 0x3f]
and eax, 0xffffffc0
add edx, eax
test esi, esi
jne 0x4054f4
cmp dword [ecx + 0xc], esi
je 0x405536
mov eax, 0xfffffffe
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x1000]
cmp eax, 0x2000
jb 0x405a1b
mov esi, dword [ecx + 0xc]
lea eax, [esi + 0x1000]
cmp eax, 0x2000
jae 0x405536
test esi, esi
jne 0x405a1b
mov eax, dword [ebp - 0x18]
add ecx, 0x18
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x10]
jb 0x4054b0
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp + 0x2c]
jmp 0x4053bf
mov eax, 0xfffffffd
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebx + 0x5c], eax
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x40557c
or eax, 0xffffffff
mov ecx, dword [ebp + 0x3c]
mov edx, dword [ebp + 0x40]
mov dword [ebx + 0x60], eax
mov eax, dword [ebp + 0x34]
mov dword [ebx + 0x90], eax
mov eax, dword [ebp + 0x38]
mov dword [ebx + 0xb8], eax
mov eax, ecx
or eax, edx
mov dword [ebx + 0x9c], 0xffffffff
mov byte [ebx + 0x10c0], 0
jne 0x4055b4
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, dword [ebp + 0x44]
mov dword [ebx + 0xa0], ecx
mov dword [ebx + 0xa4], edx
test eax, eax
jne 0x4055ca
or eax, 0xffffffff
mov dword [ebx + 0xb0], eax
mov eax, dword [ebp + 0x48]
test eax, eax
je 0x4055dc
mov ecx, dword [ebp + 0x4c]
jmp 0x4055e3
mov ecx, ebx
mov eax, 0x41ec50
mov dword [ebx + 0x94], eax
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x98], ecx
test eax, eax
je 0x405600
push eax
push ebx
call fcn.00406310
add esp, 8
test esi, esi
jne 0x40560f
mov eax, dword [ebp - 0x10]
mov byte [ebx + 0x34], al
mov dword [ebx + 0x38], edi
jmp 0x40566f
mov edx, dword [ebp - 0x10]
test edx, edx
je 0x405638
mov byte [ebx + 0x34], dl
lea ecx, [edi + 8]
mov dword [ebx + 0x38], edi
nop
lea eax, [ebx + esi]
add esi, 0x3f
add esi, dword [ecx]
lea ecx, [ecx + 0x18]
and esi, 0xffffffc0
mov dword [ecx - 0x10], eax
sub edx, 1
jne 0x405620
jmp 0x40566f
lea edi, [ebx + esi]
mov byte [ebx + 0x34], 1
mov dword [ebx + 0x38], edi
lea eax, [esi + 0x57]
and eax, 0xffffffc0
mov dword [edi], 0x19281207
add eax, ebx
mov dword [edi + 4], 0
mov dword [edi + 8], 0x20000
mov dword [edi + 0xc], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
mov eax, dword [ebp + 0x54]
mov dword [ebx + 0x3c], edi
mov byte [ebx + 0x35], 0
test eax, eax
je 0x40569e
push dword [ebp + 0x58]
lea esi, [ebx + 0xbc]
push eax
push 0x1004
push esi
call fcn.004082a0
add esp, 0x10
cmp byte [esi], 0
je 0x40569e
or dword [ebx + 0x30], 1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x405760
push eax
call sym.rdtsc.exe_nocrt_strlen
mov esi, eax
add esp, 4
lea eax, [esi + 0x10]
call fcn.00401530
mov edi, esp
push esi
push dword [ebp + 0xc]
push edi
call sym.rdtsc.exe_nocrt_memcpy
add esi, edi
push str._DEST
push esi
call sym.rdtsc.exe_nocrt_strcpy
push edi
call fcn.0040f210
add esp, 0x18
test eax, eax
je 0x4056ec
push eax
push ebx
call fcn.00405a40
add esp, 8
push str._FLAGS
push esi
call sym.rdtsc.exe_nocrt_strcpy
push edi
call fcn.0040f210
add esp, 0xc
test eax, eax
je 0x40570e
push eax
push ebx
call fcn.004060d0
add esp, 8
push edi
mov byte [esi], 0
call fcn.0040f210
add esp, 4
test eax, eax
je 0x405728
push eax
push ebx
call fcn.00406310
add esp, 8
push str._MAX_PER_GROUP
push esi
call sym.rdtsc.exe_nocrt_strcpy
push edi
call fcn.0040f210
add esp, 0xc
test eax, eax
je 0x405760
lea ecx, [ebp - 8]
push ecx
push 0
push eax
call fcn.004030d0
add esp, 0xc
test eax, eax
js 0x405760
mov eax, dword [ebp - 8]
test eax, eax
jne 0x40575d
or eax, 0xffffffff
mov dword [ebx + 0x60], eax
mov ecx, dword [ebx + 0x30]
xor esi, esi
mov eax, ecx
and eax, 0x20001
cmp eax, 0x20000
jne 0x40577c
and ecx, 0xfffdffff
mov dword [ebx + 0x30], ecx
mov edi, dword [ebp + 0x50]
mov eax, ecx
and eax, 0x20001
cmp eax, 1
jne 0x40579a
push edi
push ebx
call fcn.004045e0
mov ecx, dword [ebx + 0x30]
add esp, 8
mov esi, eax
test cl, 0x20
je 0x405899
test esi, esi
js 0x4058d6
cmp dword [ebx], 0x19320731
mov edi, dword [ebx + 0x64]
jne 0x405891
cmp dword [ebx + 0x20], 0xd
jne 0x40588a
cmp dword [ebx + 0x24], 0x10c8
jne 0x40588a
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4057eb
push eax
call fcn.0040f000
mov esi, eax
add esp, 4
test esi, esi
js 0x405896
xor esi, esi
test edi, edi
jne 0x4057f6
mov edi, 0x80000
cmp dword [ebx + 0x64], edi
jne 0x405800
cmp dword [ebx + 0x74], esi
jne 0x405878
mov esi, dword [ebx + 0x74]
mov eax, dword [ebx + 0x70]
sub esi, eax
cmp esi, 0x10
jb 0x405820
cmp esi, edi
jb 0x405825
sub esi, edi
push edi
add esi, eax
push esi
push eax
call sym.rdtsc.exe_nocrt_memmove
add esp, 0xc
mov esi, 0x10
mov eax, dword [ebx + 0x74]
push 0x41ecc4
push edi
push eax
call fcn.0040afa0
add esp, 0xc
mov dword [ebp - 0x14], eax
test eax, eax
je 0x405873
push 0x10
lea ecx, [eax + esi]
mov dword [ebx + 0x70], eax
push str.START_RING_BUF
push eax
mov dword [ebx + 0x74], ecx
mov dword [ebx + 0x64], edi
call sym.rdtsc.exe_nocrt_memcpy
mov eax, dword [ebp - 0x14]
push 0x10
add eax, 0xfffffff0
add eax, edi
push 0x41ed10
push eax
call sym.rdtsc.exe_nocrt_memcpy
add esp, 0x18
xor esi, esi
jmp 0x405878
mov esi, 0xfffffff8
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x405896
push eax
call fcn.0040eff0
add esp, 4
jmp 0x405896
mov esi, 0xffffa8e4
jmp 0x405896
mov esi, 0xfffffffd
mov edi, dword [ebp + 0x50]
test esi, esi
js 0x4058d6
cmp dword [ebp + 0x14], 0
jl 0x405930
jg 0x4058b3
cmp dword [ebp + 0x10], 0
jb 0x405930
lea eax, [ebx + 0x40]
push 1
push eax
call fcn.0040ef50
mov esi, eax
add esp, 8
test esi, esi
jns 0x405930
push str.failed_to_create_semaphore
push esi
push edi
call fcn.00410400
add esp, 0xc
mov ecx, dword [ebx + 0x94]
mov edi, dword [ebx + 0x98]
mov eax, dword [ecx + 4]
mov dword [ebp - 8], eax
cmp eax, 0x4034c0
jne 0x4059b8
mov eax, dword [edi + 0x9c]
cmp eax, 0xffffffff
je 0x405907
push eax
call fcn.0040a580
add esp, 4
push ebx
mov dword [edi + 0x9c], 0xffffffff
call fcn.0040af80
add esp, 4
mov eax, esi
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
call fcn.0040f130
mov edi, eax
test edi, edi
je 0x405967
push edi
call fcn.004101b0
push dword [ebx + 0x40]
mov esi, eax
call fcn.0040f000
push edi
call fcn.004101b0
push dword [ebx + 0x40]
mov edi, eax
sub edi, esi
call fcn.0040eff0
add esp, 0x10
mov eax, 0x446e80
xchg dword [eax], edi
mov esi, dword [ebx + 0x90]
test esi, esi
je 0x405986
push 0x404ea0
push 0
push ebx
mov ecx, esi
call dword [section..rdata]
call esi
add esp, 0xc
mov eax, dword [ebp + 8]
mov byte [ebx + 0x53], 1
mov dword [eax], ebx
cmp dword [0x446ea0], 0
jne 0x4059a2
mov dword [0x446ea0], fcn.004064e0
xor eax, eax
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
push edi
push ecx
mov ecx, eax
call dword [section..rdata]
call dword [ebp - 8]
add esp, 8
push ebx
call fcn.0040af80
add esp, 4
mov eax, esi
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
mov esi, 0xfffffff8
mov eax, esi
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffca
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffa
lea esp, [ebp - 0x24]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013b0
mov esp, ebp
pop ebp
ret