Function at 0x407ecc
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x980
push ebx
push esi
push edi
push 0x41305c
push dword [ebp + 0xc]
lea eax, [ebp - 0x1c]
mov esi, ecx
push eax
call fcn.004036da
add esp, 0xc
lea ecx, [esi + 0x18]
push eax
call fcn.0040a895
lea ecx, [ebp - 0x1c]
call fcn.00402172
mov al, byte [ebp + 8]
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x38]
mov byte [esi + 0x80], al
mov dword [ebp - 0x2c], 0x4102f8
mov dword [ebp - 0x24], 0x4102f0
call fcn.0040210f
mov eax, dword [esi + 4]
mov dword [ebp - 0x38], 0x4102ec
cmp byte [eax + 0x1f0], bl
jne 0x407f80
cmp byte [eax + 0x1f2], bl
jne 0x407f80
cmp byte [ebp + 8], bl
jne 0x407f47
mov ecx, esi
call fcn.004084b0
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edi, eax
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push 0x405ce7
push ebx
push ebx
mov dword [esi + 0x10], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x2710
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp edi, ebx
je 0x407f80
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 8], bl
je 0x40805c
lea ecx, [ebp - 0x60]
call fcn.004012b2
push ebx
lea eax, [esi + 0x18]
sub esp, 0x1c
mov ecx, esp
push str.setup.boot
push eax
push ecx
call fcn.004036da
add esp, 0xc
lea ecx, [ebp - 0x60]
call fcn.004012e9
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x17f]
mov byte [ebp - 0x180], bl
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x180]
lea ecx, [ebp - 0x60]
push eax
call fcn.004019bd
lea eax, [ebp - 0x180]
push ebx
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], 0x4102f8
mov dword [ebp - 8], 0x4102f0
call fcn.00402a82
mov eax, dword [0x4103a4]
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push 1
push eax
mov dword [ebp - 0x1c], 0x4102ec
mov dword [ebp + 8], 0xa
call fcn.0040a59f
dec eax
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.004031bb
push eax
lea ecx, [ebp - 0x38]
call fcn.0040a895
lea ecx, [ebp - 0x7c]
call fcn.00402172
lea ecx, [ebp - 0x1c]
call fcn.00402172
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x60], 0x4102e8
call fcn.004017e2
lea ecx, [ebp - 0x58]
call fcn.00402172
jmp 0x40806f
lea eax, [ebp - 0x38]
mov ecx, esi
push eax
call fcn.004086e7
cmp eax, ebx
jne 0x408134
lea ecx, [ebp - 0x38]
call fcn.00402639
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov eax, dword [esi + 0x84]
cmp eax, edi
je 0x4080a3
cmp eax, ebx
je 0x40809d
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esi + 0x84], ebx
mov dword [esi + 0x84], edi
cmp dword [esi + 0x84], ebx
jne 0x4080b5
mov esi, 0xffffe88d
jmp 0x408136
mov ecx, esi
call fcn.00408457
mov eax, dword [esi + 0x84]
push str.Start
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x4080dc
mov esi, 0xffffe88f
jmp 0x408136
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x97f]
mov byte [ebp - 0x980], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esi + 4]
mov ecx, edi
call fcn.00402639
push dword [edi + 4]
lea eax, [ebp - 0x980]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edi, [esi + 0x18]
mov ecx, edi
call fcn.00402639
push 0x408147
mov edi, dword [edi + 4]
push dword [esi + 8]
lea eax, [ebp - 0x980]
push dword [esi + 0x54]
push dword [esi + 0x14]
push edi
push eax
call dword [ebp + 8]
mov esi, eax
lea ecx, [ebp - 0x38]
call fcn.00402172
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8