Function at 0x402800
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x417ea4]
push esi
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], ecx
cmp eax, dword [0x4170d4]
jl 0x402834
test eax, eax
je 0x402834
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xea60
call esi
cmp dword [0x417ea4], 0
jne 0x402824
push 0x418fc0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x417ea4]
cmp esi, dword [0x4170d4]
jl 0x40285d
push 0x418fc0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], 0
mov ecx, 1
push ebx
mov ebx, dword [ebp + 0xc]
push edi
test esi, esi
jle 0x4028f6
mov eax, dword [0x418f8c]
mov edi, dword [ebp + 0x10]
add eax, 0xc
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 4]
xor esi, esi
cmp dword [eax - 4], edx
cmove ecx, esi
mov dword [ebp - 0x10], ecx
xor ecx, ecx
test ebx, ebx
jle 0x4028ad
mov esi, dword [ebp + 8]
mov edx, dword [eax]
add esi, edi
nop
mov al, byte [esi + ecx]
cmp al, byte [edx + ecx]
jne 0x4028bf
inc ecx
cmp ecx, ebx
jl 0x4028a0
push 0x418fc0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
inc edx
mov esi, dword [0x417ea4]
add eax, 0x14
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
cmp edx, esi
jl 0x402884
cmp ecx, 1
je 0x4028f6
mov edx, dword [0x418f8c]
lea eax, [esi + esi*4]
lea esi, [edx + eax*4]
mov dword [esi + 4], 0
jmp 0x40294e
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402900
sub ecx, edx
lea eax, [esi + esi*4]
mov edx, dword [0x418f8c]
xor edi, edi
sar ecx, 1
lea esi, [edx + eax*4]
mov dword [esi + 4], ecx
test ecx, ecx
jle 0x402943
mov ebx, dword [ebp - 0x14]
mov edx, dword [esi]
sub ebx, edx
jmp 0x402930
mov ax, word [ebx + edx]
lea edx, [edx + 2]
inc edi
mov word [edx - 2], ax
cmp edi, ecx
jl 0x402930
mov ebx, dword [ebp + 0xc]
mov eax, dword [esi]
xor ecx, ecx
mov word [eax + edi*2], cx
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
mov dword [esi + 8], eax
cmp dword [esi + 0x10], ebx
jge 0x402973
lea eax, [ebx + 1]
push eax
push dword [esi + 0xc]
call fcn.00404a32
add esp, 8
test eax, eax
je 0x4029f1
mov dword [esi + 0xc], eax
lea eax, [ebx + edi]
mov dword [ebp - 0x14], eax
cmp edi, eax
jge 0x40299f
mov ebx, dword [ebp + 8]
xor edx, edx
add ebx, edi
cmp edi, 0x800
jge 0x40299c
mov ecx, dword [esi + 0xc]
inc edi
mov al, byte [edx + ebx]
mov byte [edx + ecx], al
inc edx
cmp edi, dword [ebp - 0x14]
jl 0x402984
mov ebx, dword [ebp + 0xc]
mov eax, dword [esi + 0xc]
inc dword [0x417ea4]
push 0x418fc0
mov dword [esi + 0x10], ebx
mov byte [ebx + eax], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x4170d0], 1
jne 0x4029ea
mov ecx, dword [0x417ea8]
xor eax, eax
test ecx, ecx
jle 0x4029e2
mov edx, dword [0x418f80]
mov esi, dword [ebp - 4]
cmp dword [edx + eax*4], esi
je 0x4029ea
inc eax
cmp eax, ecx
jl 0x4029d8
mov ecx, dword [ebp - 4]
call fcn.00403e40
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [0x417ea0], 1
jne 0x402a0e
push 0
push str.Debug_Message
push str.cannot_allocate_more_space_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]