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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x68]
mov ecx, dword [0x43f7fc]
cdq
idiv ecx
push ebx
push ebp
push esi
mov esi, ecx
shl ecx, 9
push edi
imul esi, eax
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
inc ecx
mov dword [esp + 0x1c], eax
push ecx
call fcn.0041cc08
mov ecx, dword [0x43f7fc]
add esp, 4
shl ecx, 9
inc ecx
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
xor ebx, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x14], ebp
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [0x43f7fc]
xor edi, edi
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
test eax, eax
jle 0x4022f4
mov dword [esp + 0x10], ebp
mov ebp, esi
mov eax, dword [esp + 0x10]
push 8
push ebp
push eax
call fcn.00402040
add esp, 0xc
test eax, eax
je 0x4023f1
mov eax, dword [esp + 0x10]
mov ecx, dword [0x43f7fc]
add eax, 0x1000
inc edi
mov dword [esp + 0x10], eax
mov eax, ecx
cdq
and edx, 7
add ebp, 8
add eax, edx
sar eax, 3
cmp edi, eax
jl 0x4022b6
shl ecx, 9
inc ecx
push ecx
call fcn.0041cc08
mov ecx, dword [0x43f7fc]
add esp, 4
shl ecx, 9
inc ecx
mov edx, eax
mov ebp, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebp
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, 0x14
xor eax, eax
lea edi, [esp + 0x20]
mov dword [esp + 0x18], ebx
rep stosd dword es:[edi], eax
mov eax, esi
mov dword [esp + 0x34], edx
cdq
and edx, 0xff
mov word [esp + 0x20], 0x2c
add eax, edx
mov edx, esi
sar eax, 8
and edx, 0x800000ff
mov byte [esp + 0x23], bl
mov byte [esp + 0x24], 1
mov byte [esp + 0x25], bl
mov byte [esp + 0x26], 0xa
mov byte [esp + 0x28], 1
mov byte [esp + 0x27], bl
mov dword [esp + 0x2c], 0x200
mov dword [esp + 0x30], 3
mov dword [esp + 0x38], 0x30
mov byte [esp + 0x3c], 0xd2
mov byte [esp + 0x3d], bl
mov byte [esp + 0x3e], bl
mov byte [esp + 0x3f], al
jns 0x40239f
dec edx
or edx, 0xffffff00
inc edx
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
mov byte [esp + 0x44], dl
mov byte [esp + 0x45], 1
mov byte [esp + 0x46], bl
mov byte [esp + 0x47], bl
mov byte [esp + 0x48], bl
mov byte [esp + 0x49], bl
call esi
lea eax, [esp + 0x18]
push ebx
push eax
mov eax, dword [0x43f7d8]
lea ecx, [esp + 0x28]
push 0x50
push ecx
lea edx, [esp + 0x30]
push 0x50
push edx
push 0x4d014
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0x14
mov edi, eax
call esi
cmp edi, ebx
jne 0x402408
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0041cc31
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
cdq
idiv dword [0x43f7fc]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x74]
shl ecx, 9
mov edi, edx
mov edx, ecx
shl edi, 9
add edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x43f7fc]
cdq
and edx, 7
add eax, edx
sar eax, 3
test eax, eax
jle 0x402479
mov edi, dword [esp + 0x1c]
mov esi, ebp
lea eax, [ebx + edi]
push eax
push esi
call fcn.00402140
add esp, 8
test eax, eax
je 0x40248f
mov eax, dword [0x43f7fc]
inc ebx
cdq
and edx, 7
add esi, 0x1000
add eax, edx
sar eax, 3
cmp ebx, eax
jl 0x40244f
push ebp
call fcn.0041cc31
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
push ebp
call fcn.0041cc31
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret